mirror of https://github.com/python/cpython
Fix issue6312 - close the resp object for HEAD response.
This commit is contained in:
parent
998cc24dd4
commit
dfaced5d3d
|
@ -525,6 +525,7 @@ class HTTPResponse:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
if self._method == 'HEAD':
|
if self._method == 'HEAD':
|
||||||
|
self.close()
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
if self.chunked:
|
if self.chunked:
|
||||||
|
|
Loading…
Reference in New Issue