Add Content-Length header to Aphront file responses.
Summary: Provide a Content-Length header so that browsers can estimate time remaining for file downloads. Test Plan: Tested on our local phabricator install. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D6107
This commit is contained in:
@@ -43,6 +43,7 @@ final class AphrontFileResponse extends AphrontResponse {
|
||||
public function getHeaders() {
|
||||
$headers = array(
|
||||
array('Content-Type', $this->getMimeType()),
|
||||
array('Content-Length', strlen($this->content)),
|
||||
);
|
||||
|
||||
if (strlen($this->getDownload())) {
|
||||
|
||||
Reference in New Issue
Block a user