diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-05-19 16:52:21 +0800 |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-05-19 16:52:21 +0800 |
commit | 618802d55e19c1f2da28c9409256a7f2fbf59e99 (patch) | |
tree | 8aa4d19a9e1f0c9a0b40e40e17bc19862daa18c0 /Lib/httplib.py | |
parent | ea24dda01f0bc151b55e922a1d5ec2b6193c8006 (diff) | |
download | cpython-git-618802d55e19c1f2da28c9409256a7f2fbf59e99.tar.gz |
Fix Issue14721: Send Content-length: 0 for empty body () in the http.request
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 5d16e53c4c..98296dc3c5 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -989,7 +989,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.iteritems(): self.putheader(hdr, value) |