Responses to attachment range requests, spanning full range, does not provide a partial/range response #5064

Closed
opened 2026-02-05 09:37:47 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ssddanbrown on GitHub (Nov 27, 2024).

Seems to be causing issues serving video in chromium based browsers.
"Rare Candy" on discord helped find the cause, which is this line:

91d8d6eaaa/app/Http/RangeSupportedStream.php (L95)

Due to this, we're not sending partial/range responses to full range requests, which kinda makes sense in a way, but it seems like browsers still want/need that full range response (even for a full response) to work as desired.
Can be solved by removing the -1, but might want to check if that condition is redundant or not.
Needs test to cover.

Discord thread: https://discord.com/channels/578552496637739008/1247823044869886006

Originally created by @ssddanbrown on GitHub (Nov 27, 2024). Seems to be causing issues serving video in chromium based browsers. "Rare Candy" on discord helped find the cause, which is this line: https://github.com/BookStackApp/BookStack/blob/91d8d6eaaa5ae42fc9872901d6fcbcae8e19236e/app/Http/RangeSupportedStream.php#L95 Due to this, we're not sending partial/range responses to full range requests, which kinda makes sense in a way, but it seems like browsers still want/need that full range response (even for a full response) to work as desired. Can be solved by removing the `-1`, but might want to check if that condition is redundant or not. Needs test to cover. Discord thread: https://discord.com/channels/578552496637739008/1247823044869886006
OVERLORD added the 🐛 Bug🏭 Back-End labels 2026-02-05 09:37:47 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 28, 2024):

Potentially related to #5088

@ssddanbrown commented on GitHub (Nov 28, 2024): Potentially related to #5088
Author
Owner

@ssddanbrown commented on GitHub (Nov 29, 2024):

Addressed via e9f906ce56

@ssddanbrown commented on GitHub (Nov 29, 2024): Addressed via e9f906ce5682d43312055dd3faff77f6e39ac5be
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5064