1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 07:12:41 +01:00

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:
Chris Bolt 2013-06-01 04:11:42 -07:00 committed by epriestley
parent 0e3f4a088f
commit 0bd8374c63

View file

@ -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())) {