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

Additional reasoning for sending Accept-Encoding: identity #764

Merged
merged 1 commit into from Jun 15, 2018

Conversation

jakearchibald
Copy link
Collaborator

@jakearchibald jakearchibald commented Jun 14, 2018

I hadn't really appreciated this with the initial PR, but preventing encoding solves a pretty big gotcha if developers tried to fetch ranges with fetch().


Preview | Diff

@annevk
Copy link
Member

annevk commented Jun 15, 2018

How does it avoid a failure? Because the server won't try to send back gzip content? Or because (most) user agents only support a lack of content encoding?

@jakearchibald
Copy link
Collaborator Author

I hadn't realised that if a resource is encoded, a range is taken from that encoded resource. So if the range is bytes=1-, and the content is encoded, fetch() will always reject when it tries to decode the content.

If the server returns unencoded data, this failure won't occur.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think I read the added note wrongly the first time since it's clear now.

@annevk annevk merged commit f342c74 into master Jun 15, 2018
@annevk annevk deleted the accept-encoding-info branch June 15, 2018 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants