diff options
author | Andrey Petrov <shazow@gmail.com> | 2015-04-28 12:23:05 -0400 |
---|---|---|
committer | Andrey Petrov <shazow@gmail.com> | 2015-04-28 12:23:05 -0400 |
commit | 1bc3d2003ffbe3464a96a47a6a2ce3e18e8cc593 (patch) | |
tree | b56e713dd5182a4e95561ba7cb34a57acc9e0c66 | |
parent | 4917250ab6d5647d505e0f3ea7bcf9f995722392 (diff) | |
download | urllib3-1bc3d2003ffbe3464a96a47a6a2ce3e18e8cc593.tar.gz |
Style tweaks.
-rw-r--r-- | urllib3/response.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/urllib3/response.py b/urllib3/response.py index 8c8db76a..24140c4c 100644 --- a/urllib3/response.py +++ b/urllib3/response.py @@ -432,14 +432,14 @@ class HTTPResponse(io.IOBase): 'content-encoding' header. """ self._init_decoder() - # FIXME: Rewrite this method and make it a class with - # a better structured logic. + # FIXME: Rewrite this method and make it a class with a better structured logic. if not self.chunked: raise ResponseNotChunked("Response is not chunked. " "Header 'transfer-encoding: chunked' is missing.") - if (self._original_response and - self._original_response._method.upper() == 'HEAD'): + if self._original_response and self._original_response._method.upper() == 'HEAD': + # Don't bother reading the body of a HEAD request. + # FIXME: Can we do this somehow without accessing private httplib _method? self._original_response.close() return |