stable
Clone or download
Read-only
request #13321: Download of large attachment/file can be partial/resumed
This contribution introduce the support of range requests [0] when the BinaryFileResponseBuilder is used to generate an HTTP response. Requests requesting multiple ranges or specifying only how many bytes from the end of the file to return are not supported. In those cases no content-range is specified and the full body message is returned as allowed by the specification. Browsers or frequently encountered tools does not use them. Contribution can be tested by observing what's returned when pausing/resuming a download in a browser or by crafting requests with curl. [0] https://tools.ietf.org/html/rfc7233 Change-Id: I701c7434cdb39313192e56e983d74a895b493fbd
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/include/Download/DocmanFileDownloadController.php | +1 | −0 | Go to diff View file |
M | plugins/docman/include/Download/DocmanFileDownloadResponseGenerator.php | +8 | −2 | Go to diff View file |
M | plugins/docman/phpunit/Download/DocmanFileDownloadResponseGeneratorTest.php | +28 | −4 | Go to diff View file |
M | plugins/forumml/www/upload.php | +7 | −1 | Go to diff View file |
M | plugins/proftpd/include/ProFTPd/Explorer/ExplorerController.class.php | +2 | −1 | Go to diff View file |
M | plugins/webdav/include/FS/WebDAVFRSFile.class.php | +7 | −1 | Go to diff View file |
M | src/common/Http/Response/BinaryFileResponseBuilder.php | +36 | −4 | Go to diff View file |
M | src/common/frs/FRSFile.class.php | +2 | −1 | Go to diff View file |
M | src/common/wiki/lib/WikiAttachmentRevision.class.php | +7 | −1 | Go to diff View file |
M | tests/phpunit/common/Http/Response/BinaryFileResponseBuilderTest.php | +62 | −2 | Go to diff View file |