-
Notifications
You must be signed in to change notification settings - Fork 166
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
fix content-length calculation on range requests #228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch! I wonder how we missed this 🤔
Some tests for this would be great!
I see there are a few tests running on both head-requests and range-requests checking the content-length and that you fixed the test that should return something other than the full file size. It seems that I both wrote a bug and a bugged test to go with it. Really nice catch, thank you! |
I think this closes #197. I’ll try to test it out later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good. Will wait for @adumbidiot to report back before merging.
Just tested, this fixes #197 |
Great! I think I'll backport this to 0.2.x tomorrow while we work on 0.3. |
* fix content-length calculation on range requests * changelog Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
hello,
content-length response header on range requests should represent the length of the returned range, not the length of the whole file.
more explanations here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests
Best regards.