-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Force plain (not gzipped) aws response on aiohttp request #57
Conversation
Thanks for report, I will take a look once I got home, next week. On Thu, 11 Aug 2016 at 05:13 Alexej Tessaro [email protected]
|
@jettify any update on this one? |
sorry for delay I will execute my test suite for s3 today, to make sure everything is ok. Also I need help with testing, could you port at least one test from botocore that hits dynamo? |
I'm struggling finding the tests we could port, which one of https://github.com/boto/botocore/tree/master/tests you think we should port? |
oh I see, they do not have any. Then very simple test create/delete dummy table will work fine. |
@jettify ok, good chance to learn some |
@rymir I executed s3 test suite with your branch, tests are green. Lets also add comment why that header is important, just to avoid confusion later. |
5a28914
to
e449f6c
Compare
When using aiobotocore with dynamodb, requests fail on crc32 checksum computation as soon as the response data reaches ~5KB. It seems that this is due to aws sending data back in gzip compressed format, aiohttp automatically uncompressing it and crc32 checksum being computed on the uncompressed data bytes. While crc32 has to be computed on compressed data in order to pass. The same requests work as expected when using botocore, this commit forces aws not to use gzip compression.
e449f6c
to
0dae162
Compare
@jettify added a test and a comment |
thanks! |
When using aiobotocore with dynamodb, requests fail on crc32 checksum computation as soon as the response data reaches ~5KB.
It seems that this is due to aws sending data back in gzip compressed format, aiohttp automatically uncompressing it and crc32 checksum being computed on the uncompressed data bytes.
While crc32 has to be computed on compressed data in order to pass.
The same requests work as expected when using botocore, this commit forces aws not to use gzip compression.
I created this fix to show the problem and to temporarily patch the issue, but the right way would be configuring aiohttp not to uncompress the response and leave that up to botocore, so we can take advantage of the gzip compression when data >= ~5KB.