-
-
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
500s when handling a request with wrong Content-Encoding #1710
Comments
actually this is interesting. question is how to handle this situation. in any case I am going to fix this bug in version 2.0 in https://github.com/aio-libs/aiohttp |
fixed in 2.0 |
@fafhrd91, thanks for the quick respond. Is the development moving to https://github.com/aio-libs/aiohttp? |
Yes, development is moving to aio-libs. I am planing to release 2.0b early next week
…Sent from my iPhone
On Mar 11, 2017, at 11:14 PM, Rafael Barreto ***@***.***> wrote:
@fafhrd91, thanks for the quick respond. Is the development moving to https://github.com/aio-libs/aiohttp?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
fixed in master |
Long story short
When serving a request with wrong Content-Encoding (e.g.
deflate
while payload is actually not compressed), I get 500 Internal Server Error instead of a 400 Bad Request.Expected behaviour
I would expect to get a 400 Bad Request to inform the client they are not requesting correctly.
Actual behaviour
It raises a
aiohttp.errors.ContentEncodingError
exception. If I capture this exception in the handler, I can change the response. However, after terminating the application I get the following stack trace:Steps to reproduce
Content-Encoding
header. For example,Content-Encoding: gzip
but an uncompressed payload.Your environment
I'm using
aiohttp==1.3.3
with Python 3.6.The text was updated successfully, but these errors were encountered: