]> granicus.if.org Git - python/commitdiff
Merged revisions 81687 via svnmerge from
authorSenthil Kumaran <orsenthil@gmail.com>
Fri, 4 Jun 2010 16:38:00 +0000 (16:38 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Fri, 4 Jun 2010 16:38:00 +0000 (16:38 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81687 | senthil.kumaran | 2010-06-04 22:02:14 +0530 (Fri, 04 Jun 2010) | 3 lines

  Fix issue6312 - close the resp object for HEAD response.
........

Lib/http/client.py

index 2ddb0148cc1b2c93141fcbb120d0e6b683d55922..c83c53b60b072e751723b905106955514fedb6ec 100644 (file)
@@ -488,6 +488,7 @@ class HTTPResponse(io.RawIOBase):
             return b""
 
         if self._method == "HEAD":
+            self.close()
             return b""
 
         if self.chunked: