summaryrefslogtreecommitdiff
path: root/Lib/http/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/http/client.py')
-rw-r--r--Lib/http/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 6089192e22..9b01704eb0 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)