-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
c-e:gzip silently decoded when HTTP/2 is used #661
Comments
Right. Made on purpose: https://github.com/curl/curl/blob/master/lib/http.c#L3596 ... introduced in commit 133cdd2 by @FabianFrank:
|
As far as I can tell, that's just a trace for our support of earlier h2 versions and we should remove that again. Anyone disagreeing with that? |
@bagder Thank you for looking into the issue.
+1 Considering the fact that curl automatically uses HTTP/2 for https (after a successful negotation using ALPN), I think that would be the only way to preserve compatibility with older versions of curl with support for HTTP/1 only. |
I agree with @bagder, the gzip requirement part of the draft that resulted in this code didn't make it into the final RFC and the code should thus no longer be needed. |
Thanks, both of you! |
If HTTP/1 is used,
curl -H Accept-Encoding:gzip
returns gzipped content, when connecting to a server that sends the response withContent-Encoding: gzip
specified.However when HTTP/2 is used, the response is decompressed by curl itself.
Steps to reproduce:
curl -H Accept-Encoding:zip http://127.0.0.1:8080/name-of-the-text-file | gzip -cd
. The original text shows upcurl --http2 -H Accept-Encoding:gzip http://127.0.0.1:8080/name-of-the-text-file | gzip -cd
. gzip complains:gzip: unknown compression format
, since curl itself decodes the content-encoding in this case.The text was updated successfully, but these errors were encountered: