Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/response/AphrontFileResponse.php
| Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | if ($this->rangeMin || $this->rangeMax) { | ||||
| $max = $this->rangeMax; | $max = $this->rangeMax; | ||||
| $headers[] = array('Content-Range', "bytes {$min}-{$max}/{$len}"); | $headers[] = array('Content-Range', "bytes {$min}-{$max}/{$len}"); | ||||
| $content_len = ($max - $min) + 1; | $content_len = ($max - $min) + 1; | ||||
| } else { | } else { | ||||
| $content_len = $this->getContentLength(); | $content_len = $this->getContentLength(); | ||||
| } | } | ||||
| if (!$this->shouldCompressResponse()) { | if (!$this->shouldCompressResponse()) { | ||||
| $headers[] = array('Content-Length', $this->getContentLength()); | $headers[] = array('Content-Length', $content_len); | ||||
| } | } | ||||
| if (strlen($this->getDownload())) { | if (strlen($this->getDownload())) { | ||||
| $headers[] = array('X-Download-Options', 'noopen'); | $headers[] = array('X-Download-Options', 'noopen'); | ||||
| $filename = $this->getDownload(); | $filename = $this->getDownload(); | ||||
| $filename = addcslashes($filename, '"\\'); | $filename = addcslashes($filename, '"\\'); | ||||
| $headers[] = array( | $headers[] = array( | ||||
| Show All 21 Lines | |||||