diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-05-19 08:58:45 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-05-19 08:58:45 (GMT) |
commit | d34b57a9a2810e79d6f6aa7dc12832c4e4b214a5 (patch) | |
tree | a16209eba6109a3dac0779b159cd09feef54c3b9 /Lib/http | |
parent | 15e848b0767c41e6badc45316d60aa588d7e5ac1 (diff) | |
parent | 5fa4a896016e8a265b6afee64c61a1083c6ffa47 (diff) | |
download | cpython-d34b57a9a2810e79d6f6aa7dc12832c4e4b214a5.zip cpython-d34b57a9a2810e79d6f6aa7dc12832c4e4b214a5.tar.gz cpython-d34b57a9a2810e79d6f6aa7dc12832c4e4b214a5.tar.bz2 |
merge - Fix Issue14721: Send Content-length: 0 for empty body () in the http.client requests
Diffstat (limited to 'Lib/http')
-rw-r--r-- | Lib/http/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index 6089192..9b01704 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -1076,7 +1076,7 @@ class HTTPConnection: self.putrequest(method, url, **skips) - if body and ('content-length' not in header_names): + if body is not None and ('content-length' not in header_names): self._set_content_length(body) for hdr, value in headers.items(): self.putheader(hdr, value) |