-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
curl cannot decode non-simple Transfer-Encoding #16956
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
Comments
When you tested the Edit:
|
If the choice had been |
A guess is that browsers handle unsolicited |
- allow and ignore "identity" as an encoding - fail if any other encoder than chunked follows after chunked - fail on unsolicited encodings - when the server encodes but curl did not ask for it Add test 1493 to 1496 to verify. Reported-by: Jonathan Rosa Fixes #16956
I was testing without the option the whole time. With the option, everything works surprisingly as expected and even decodes the binary unsolicited.
|
Yeah, a browser sends |
What do you mean? When you use the option the client asks for Transfer-Encoding, how is that "unsolicited" ?
That's Accept-Encoding (encoding content), let's not confuse this with the Transfer-Encoding this issue is about! |
Oh, I see, I did not see the
|
I believe that there is confusion in what I thought what the bug was and what the bug actually is. |
- allow and ignore "identity" as an encoding - fail if any other encoder than chunked follows after chunked - fail on unsolicited encodings - when the server encodes but curl did not ask for it Add test 1493 to 1496 to verify. Disable test 319 as that is now broken: issue curl#16974 Reported-by: Jonathan Rosa Fixes curl#16956 Closes curl#16959
I did this
This is a bug report where cURL does not understand
Transfer-Encoding
other than solelychunked
.Firefox and Chrome behavior reference
Neither browser cares where is
chunked
, they both show "Hello world" unless it is encoded, neither browser supports encodings in Transfer-Encoding other thanchunked
.cURL
Response:
Expected output:
Actual output:
Response:
Expected output:
Error, because
chunked
must be last according to spec (6.1 of RFC 9112).Actual output:
Response:
Expected output:
Actual output:
Response:
Expected output:
Error, because
chunked
must be last according to spec (6.1 of RFC 9112).Actual output:
I expected the following
No response
curl/libcurl version
curl 8.13.0 (aarch64-apple-darwin24.2.0) libcurl/8.13.0 OpenSSL/3.4.1 (SecureTransport) zlib/1.2.12 brotli/1.1.0 zstd/1.5.7 AppleIDN libssh2/1.11.1 nghttp2/1.65.0 librtmp/2.3
Release-Date: 2025-04-02
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
operating system
macOS 15.3.1 (24D70)
The text was updated successfully, but these errors were encountered: