mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-16 16:58:38 +01:00
Correct an issue where the wrong "Content-Length" was set for partial content responses
Summary: Ref T8266. Although we compute this correctly above, we ignored it when actually setting the header. Use the computed value to set the "Content-Length" header. This is consistent with the spec/documentation. Test Plan: Before, some audio (like `rain.mp3`) was pretty spotty about loading in Safari. It now loads consistently for me locally. Reviewers: chad Reviewed By: chad Maniphest Tasks: T8266 Differential Revision: https://secure.phabricator.com/D17624
This commit is contained in:
parent
45fc4f6f64
commit
c4c3de7bfa
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ final class AphrontFileResponse extends AphrontResponse {
|
|||
}
|
||||
|
||||
if (!$this->shouldCompressResponse()) {
|
||||
$headers[] = array('Content-Length', $this->getContentLength());
|
||||
$headers[] = array('Content-Length', $content_len);
|
||||
}
|
||||
|
||||
if (strlen($this->getDownload())) {
|
||||
|
|
Loading…
Add table
Reference in a new issue