-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
auto_decompress=False modified binary data somehow #3182
Comments
In my debugging I've confirmed that in the troubling case (compression='gzip' and auto_decompress=False), the Since the compressions part of the payload handling is not being called, the difference must be some kind of bug in the feed_data() handler. |
I'm not sure what's wrong here. What else would you expect from writing raw gzipped bytes to disk? |
You download raw gzipped content by aiohttp but uncompressed one by wget. |
Thank you for looking at this. Now that I have found the root cause, I can confirm that (for me) all the aiohttp features are working as expected. The root cause was that the test server was serving .tar.gz files and incorrectly setting
Also this blog post seems to describe this webserver's behavior exactly. |
Good! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
Use aiohttp with
auto_decompress=False
and try to download binary data. Here is a Python snippet example also in this gist.Now let's download it with wget and do some sha256 comparisons. Run these shell commmands:
Expected behaviour
I expect when
auto_decompress=False
for the data to be read without alteration.Actual behaviour
The data is being transformed into a gzip file. At least that is what the
file
utility says. When I run file on both downloaded version I get:Steps to reproduce
Run the scripts above in a Python 3.5 environment.
Your environment
I'm using aiohttp v3.3.2 as a client.
The text was updated successfully, but these errors were encountered: