commit | 5fa4a896016e8a265b6afee64c61a1083c6ffa47 | [log] [tgz] |
---|---|---|
author | Senthil Kumaran <senthil@uthcode.com> | Sat May 19 16:58:09 2012 +0800 |
committer | Senthil Kumaran <senthil@uthcode.com> | Sat May 19 16:58:09 2012 +0800 |
tree | 2144befcbb5679eb13cdc8b7c51fa2550288ec9f | |
parent | 1be320ebdd5b1f46f32e32c83f3c1e982e2d27e2 [diff] [blame] |
Fix Issue14721: Send Content-length: 0 for empty body () in the http.client requests
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 @@ 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)