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

Treat out-of-range last_pos as the end of the content #2009

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

bobrofon
Copy link
Contributor

RFC-9110 '14.1.2. Byte Ranges':
A client can limit the number of bytes requested without knowing the size of the selected representation. If the last-pos value is absent, or if the value is greater than or equal to the current length of the representation data, the byte range is interpreted as the remainder of the representation (i.e., the server replaces the value of last-pos with a value that is one less than the current length of the selected representation).

https://www.rfc-editor.org/rfc/rfc9110.html#section-14.1.2-6

RFC-9110 '14.1.2. Byte Ranges':
A client can limit the number of bytes requested without knowing the
size of the selected representation. If the last-pos value is absent,
or if the value is greater than or equal to the current length of the
representation data, the byte range is interpreted as the remainder of
the representation (i.e., the server replaces the value of last-pos
with a value that is one less than the current length of the selected
representation).

https://www.rfc-editor.org/rfc/rfc9110.html#section-14.1.2-6
@yhirose
Copy link
Owner

yhirose commented Dec 23, 2024

@bobrofon thanks for the pull request. Could you please add unit tests for the change?

@yhirose
Copy link
Owner

yhirose commented Dec 23, 2024

@bobrofon sorry. You have already added them. :)

@yhirose yhirose merged commit 8794792 into yhirose:master Dec 23, 2024
4 checks passed
@yhirose
Copy link
Owner

yhirose commented Dec 23, 2024

@bobrofon thanks for your contribution!

@bobrofon bobrofon deleted the range-last-pos branch December 24, 2024 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants