]> BookStack Code Mirror - bookstack/commit
Attachments: Fixed full range request handling
authorDan Brown <redacted>
Fri, 29 Nov 2024 13:19:55 +0000 (13:19 +0000)
committerDan Brown <redacted>
Fri, 29 Nov 2024 13:19:55 +0000 (13:19 +0000)
commite9f906ce5682d43312055dd3faff77f6e39ac5be
treec9b2e5ba23dff55f183c6df0639d8a3ad9f268fe
parent4630f0728225dbbfca285bd88345a678cf8d02d1
Attachments: Fixed full range request handling

We were not responsing with a range request, where the requested range
was for the full extent of content. This changes things to always
provide a range request, even for the full range.

Change made since our existing logic could cause problems in chromium
browsers.

Elseif statement removed as its was likley redundant based upon other
existing checks.
This also changes responses for requested ranges beyond content, but I
think that's technically correct looking at the spec (416 are for when
there are no overlapping request/response ranges at all).

Updated tests to cover.
For #5342
app/Http/RangeSupportedStream.php
tests/Uploads/AttachmentTest.php