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

Don't decompress gzip if data doesn't look like gzip #746

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WGH-
Copy link
Collaborator

@WGH- WGH- commented Jan 5, 2023

See #745 for more information.

Closes #745

@WGH- WGH- force-pushed the gzip-probing branch 2 times, most recently from a6fee18 to 50c9eeb Compare January 16, 2023 15:56
@WGH- WGH- requested a review from asciimoo January 16, 2023 16:00
This is not about Content-Encoding: gzip, which is undone
automatically by Go net/http.

This is about files that are compressed as is, e.g. /sitemap.xml.gz,
without Content-Encoding: gzip being sent.
@WGH-
Copy link
Collaborator Author

WGH- commented Oct 16, 2023

@asciimoo ping

Prevents incorrect response being returned in cases like
/sitemap.xml.gz is requested, but uncompressed 404 page is served
instead.

Thanks-to: Seth Davis <[email protected]>
@WGH-
Copy link
Collaborator Author

WGH- commented Nov 21, 2023

@seedifferently I added a different test-case compared to what you did in #792, but it should catch the same problem nonetheless

@WGH- WGH- marked this pull request as ready for review November 21, 2023 16:38
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.

Attempting to fetch nonexisting /sitemap.xml.gz results in "gzip: invalid header"
1 participant