From ed9204346e02a2353752a38bf0381b622938c0bb Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Wed, 28 Apr 2010 17:20:43 +0000 Subject: Fixed Issue6312 - httplib fails with HEAD requests to pages with "transfer-encoding: chunked" --- Lib/httplib.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Lib/httplib.py') diff --git a/Lib/httplib.py b/Lib/httplib.py index 43c879790a..5eb3f0d1fa 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -524,6 +524,9 @@ class HTTPResponse: if self.fp is None: return '' + if self._method == 'HEAD': + return '' + if self.chunked: return self._read_chunked(amt) -- cgit v1.2.1