From 0bd8374c634d668988486b143f5a04f1db1bd521 Mon Sep 17 00:00:00 2001 From: Chris Bolt Date: Sat, 1 Jun 2013 04:11:42 -0700 Subject: [PATCH] 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 --- src/aphront/response/AphrontFileResponse.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aphront/response/AphrontFileResponse.php b/src/aphront/response/AphrontFileResponse.php index 1d9e0e3337..01288c50a4 100644 --- a/src/aphront/response/AphrontFileResponse.php +++ b/src/aphront/response/AphrontFileResponse.php @@ -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())) {