mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-23 20:19:03 +01:00
When requesting file data, make "Range: bytes=0-" work correctly
Summary: Ref T12219. Chrome can send requests with a "Range: bytes=0-" header, which just means "the whole file", but we don't respond correctly because of a `null` vs `0` issue. Test Plan: Sent a raw `bytes=0-` request, saw a proper resonse. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12219 Differential Revision: https://secure.phabricator.com/D17627
This commit is contained in:
parent
d1a971e221
commit
f2a26b2601
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ final class AphrontFileResponse extends AphrontResponse {
|
||||||
array('Accept-Ranges', 'bytes'),
|
array('Accept-Ranges', 'bytes'),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($this->rangeMin || $this->rangeMax) {
|
if ($this->rangeMin !== null || $this->rangeMax !== null) {
|
||||||
$len = $this->getContentLength();
|
$len = $this->getContentLength();
|
||||||
$min = $this->rangeMin;
|
$min = $this->rangeMin;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue