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

Remove header Content-Encoding when archiving #1290

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

5long
Copy link
Contributor

@5long 5long commented Dec 11, 2023

Content-Encoding is a representation header which kinda means "same content, presented differently to different clients" or "encoded & decoded on-the-fly, guided by content negotiation".

In the case of downloading an archive, MDN docs explicitly says that (quoted from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding):

If the original media is encoded in some way (e.g. a zip file) then this
information would not be included in the Content-Encoding header.

Thus this patch. Also fixes #1187.

Content-Encoding is a representation header which kinda means "same
content, presented differently to different clients" or "encoded
& decoded on-the-fly, guided by content negotiation".

In the case of downloading an archive, MDN docs explicitly says that
(quoted from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding):

> If the original media is encoded in some way (e.g. a zip file) then this
> information would not be included in the Content-Encoding header.

Thus this patch. Also fixes !1187.
@svenstaro
Copy link
Owner

Seems good to me, thanks!

svenstaro added a commit that referenced this pull request Jan 3, 2024
@svenstaro svenstaro merged commit bb11598 into svenstaro:master Jan 3, 2024
4 of 19 checks passed
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.

.tar.gz download is broken and only downloads uncompressed tar
2 participants