commit | 618802d55e19c1f2da28c9409256a7f2fbf59e99 | [log] [tgz] |
---|---|---|
author | Senthil Kumaran <senthil@uthcode.com> | Sat May 19 16:52:21 2012 +0800 |
committer | Senthil Kumaran <senthil@uthcode.com> | Sat May 19 16:52:21 2012 +0800 |
tree | 8aa4d19a9e1f0c9a0b40e40e17bc19862daa18c0 | |
parent | ea24dda01f0bc151b55e922a1d5ec2b6193c8006 [diff] [blame] |
Fix Issue14721: Send Content-length: 0 for empty body () in the http.request
diff --git a/Lib/httplib.py b/Lib/httplib.py index 5d16e53..98296dc 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py
@@ -989,7 +989,7 @@ 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)