-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
error decoding response body: deflate decompression error for garagehq.deuxfleurs.fr #1462
Comments
I found a list of websites supporting deflate and it looks like a significant number of them don't work with reqwest:
(omitted sites that didn't serve me deflate content) |
Would be curious what is different, and why the deflate library we're using is hitting an error only on some sites. |
garagehq.deuxfleurs.fr is served by tricot. It uses the same crate as reqwest to handle compression ( |
I have the same problem with reqwest 0.11.18 (features = ["blocking", "json", "rustls", "deflate"]), in blocking mode. I made two tests, with the same server and content Test 1: using reqwest 'automatic' decompression
Then I have a
If I don't change the server, but:
then I can decompress with no problems. I checked with 'wireshark', and in both cases (automatic decompress by reqwest or manual decompression as above) the response seems fine:
so I really think that it is a bug in 'reqwest'... |
Pull request #1927 made to solve this problems (it solved it for me...) |
FYI, It would be nice if there were a middle ground that worked for servers that correctly follow the standard vs the majority that don't. |
I didn't know that... Thanks for pointing it out. The standard seems misleading, but it's the standard... and what's implemened everywhere. |
I've reverted in #1952, to try to get a fix out soon. Anyone is welcome to try adding the ability to try both. |
When trying to download content from garagehq.deuxfleurs.fr I get the following error when reading the request body:
reqwest version: 0.11.9 features
["brotli", "deflate", "gzip", "json", "multipart", "rustls-tls-native-roots", "trust-dns"]
, hyper version: 0.14.16Logs for request of https://garagehq.deuxfleurs.fr/rss.xml
Interestingly I can't see any
Content-Encoding
headers. Maybe they are stripped by hyper or reqwest before I can see them?The website itself appears to support deflate, gzip and zstd compression which curl can read just fine.
The server appears to have a server-side preference for zstd, then deflate. So it does make sense that the deflate content was being returned.
Minimal Working Example
Create run the following program:
It succeeds without the
deflate
feature and fails whendeflate
is added. Note that my full program is using the async interface.The text was updated successfully, but these errors were encountered: