KeepSafe/aiohttp — pull request #95 by kxepal (2014-07-03 00:32:40+00:00)
Title: Don't parse message body for HEAD responses

Currently, there is a bug when aiohttp after receiving response headers falls into awaiting for further message body of specified size or chunked transfer, since Server SHOULD send them as is for GET request. Certainly, it will never receive it from _valid_ HTTP server.

The HEAD method is identical to GET except that the server MUST NOT
send a message body in the response (i.e., the response terminates at
the end of the header section). The server SHOULD send the same
header fields in response to a HEAD request as it would have sent if
the request had been a GET, except that the payload header fields
(Section 3.3) MAY be omitted.

-- http://tools.ietf.org/html/rfc7231#section-4.3.2