Skip to content
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

[enhancement] Add ability to disable automatic decompression of body #1992

Closed
thehesiod opened this issue Jun 19, 2017 · 5 comments
Closed
Labels

Comments

@thehesiod
Copy link
Contributor

In our library we'd like the ability to disable the automatic decompression of the request body as we need to compare a hash in the headers to the original body.

Right now this doesn't seem to be possible as the HTTP parser creates a DeflateBuffer which will automatically decompress the body. If guidance is given how this should be achieved I can create a PR and test case.

@fafhrd91
Copy link
Member

let's split this into two parts

  1. add extra parameter to HttpParser, so it can create HttpPayloadParser with compression=None. This should with both python parser and c-extension parser. this should be simple
  2. modify client/web api. this is complicated part, because decompression could start before handler get called.

@asvetlov thoughts?

@asvetlov
Copy link
Member

asvetlov commented Jun 20, 2017

I believe @thehesiod talks about client API.
It could be done by simple flag in session.get() and family.

@thehesiod
Copy link
Contributor Author

thehesiod commented Jul 17, 2017

I just noticed that if I try a aiobotocore s3 client get_object of a key that a Content-Encoding metadata set to gzip, it's automatically decompressing the body as well, not-good...this means it returns the wrong datatype for an expected operation due to the automatic decompression. I'll link another bug report to this.

@thehesiod
Copy link
Contributor Author

ok, created PR which resolves this

@lock
Copy link

lock bot commented Oct 28, 2019

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.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants