This commit is contained in:
Jeremy Hylton 2007-08-10 18:49:01 +00:00
parent 6e69f7faa3
commit 4b878bd3d5

View file

@ -894,9 +894,9 @@ class HTTPConnection:
self.putrequest(method, url, **skips)
if body and ('content-length' not in header_names):
thelen=None
thelen = None
try:
thelen=str(len(body))
thelen = str(len(body))
except TypeError as te:
# If this is a file-like object, try to
# fstat its file descriptor