-
-
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
Gzipped 204 responses raises ContentEncodingError #609
Comments
Looks familiar #154 |
What the expected result should be? |
It should a least not declare an error 400 (it's not a "Bad request"). Edit: Requests does not fail and returns a normal response object with an empty body In [1]: import requests
In [2]: response = requests.post('http://localhost:5000')
In [3]: response
Out[3]: <Response [204]>
In [4]: response.text
Out[4]: u'' |
204 with body is forbidden combination from my perspective. |
I think you misunderstood, in my example, there is no body, the response seems well-formed :) |
Any updates on this ? |
I just ran into this same problem with aiohttp version 0.21.6 (and filed an upstream bug at influxdata/influxdb#6624). In my use case, I'm expecting the 204 up front, and if I don't get a 204, I don't mind if the response is not compressed – so I can set the header FWIW there is precedent for the client to gracefully accept a 204 with |
Ditto, any empty response causes |
Using the latest |
fixed in master |
When querying an HTTP endpoint that returns a 204 with a
content-encoding: gzip
, aiohttp raises aaiohttp.errors.ContentEncodingError: 400, message='deflate'
.(Note that aiohttp claims it's a error 400 but the server sends a 204 :
127.0.0.1 - - [30/Oct/2015 13:01:37] "POST / HTTP/1.1" 204 -
)I made a small repo with a minimal example : https://github.com/C4ptainCrunch/aiohttp-204-gzip-bug
Here is the full stacktrace :
The text was updated successfully, but these errors were encountered: