Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ssddanbrown opened this issue Nov 27, 2024 · 2 comments

Comments

@ssddanbrown
Copy link
Member

ssddanbrown commented 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:

} elseif ($end - $start < $this->fileSize - 1) {

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

@ssddanbrown
Copy link
Member Author

ssddanbrown commented Nov 28, 2024

Potentially related to #5088

ssddanbrown added a commit that referenced this issue Nov 29, 2024
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
@ssddanbrown
Copy link
Member Author

Addressed via e9f906c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant