Skip to content
Snippets Groups Projects
Commit 4a829bcf authored by Bryan Tong Minh's avatar Bryan Tong Minh
Browse files

Explicitly convert Content-Length to string

parent 7ceb14b5
No related branches found
No related tags found
No related merge requests found
...@@ -84,9 +84,9 @@ class HTTPPersistentConnection(object): ...@@ -84,9 +84,9 @@ class HTTPPersistentConnection(object):
headers['Cookie'] = self.cookies[host].get_cookie_header() headers['Cookie'] = self.cookies[host].get_cookie_header()
if issubclass(data.__class__, upload.Upload): if issubclass(data.__class__, upload.Upload):
headers['Content-Type'] = data.content_type headers['Content-Type'] = data.content_type
headers['Content-Length'] = data.length; headers['Content-Length'] = str(data.length)
elif data: elif data:
headers['Content-Length'] = len(data) headers['Content-Length'] = str(len(data))
if _headers: headers.update(_headers) if _headers: headers.update(_headers)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment