diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-05-19 08:58:09 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-05-19 08:58:09 (GMT) |
commit | 5fa4a896016e8a265b6afee64c61a1083c6ffa47 (patch) | |
tree | 2144befcbb5679eb13cdc8b7c51fa2550288ec9f /Lib/http/client.py | |
parent | 1be320ebdd5b1f46f32e32c83f3c1e982e2d27e2 (diff) | |
download | cpython-5fa4a896016e8a265b6afee64c61a1083c6ffa47.zip cpython-5fa4a896016e8a265b6afee64c61a1083c6ffa47.tar.gz cpython-5fa4a896016e8a265b6afee64c61a1083c6ffa47.tar.bz2 |
Fix Issue14721: Send Content-length: 0 for empty body () in the http.client requests
Diffstat (limited to 'Lib/http/client.py')
-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 d226f63..97a7155 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -997,7 +997,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) |