-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Don't decompress responses for HEAD requests #154
Don't decompress responses for HEAD requests #154
Conversation
Looks ok, but that seems fix for this specific problem. What if you get empty body for other responses. Should deflatebuffer support empty body in general instead? |
@fafhrd91 others aren't affected by this change since it depends on |
As in general, for others, this is an error case caused by
The error raises not by HTTP protocol routines, but by decodings one. |
The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty line after the header fields. -- http://tools.ietf.org/html/rfc2616#section-10.2.5
@fafhrd91 I got your idea. There is also good old |
I'm talking about bugs in server software. Right now aiohttp can't handle On Monday, September 29, 2014, Alexander Shorin [email protected]
|
Fair enough, agreed. I'll open another PR with proper fix and better name with backreference. |
aiohttp causes error on receiving response against HEAD request with CONTENT-ENCODING header.
This happens because DeflateBuffer is been used if response is compressed and it tries to decompress the received data on feed_eof. Obliviously, it fails because no data is returned back on HEAD request.