Skip to content

Remove header Content-Encoding when archiving#1290

Merged
svenstaro merged 1 commit intosvenstaro:masterfrom
5long:remove-content-encoding
Jan 3, 2024
Merged

Remove header Content-Encoding when archiving#1290
svenstaro merged 1 commit intosvenstaro:masterfrom
5long:remove-content-encoding

Conversation

@5long
Copy link
Copy Markdown
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
Copy Markdown
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
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