New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content-Length header is duplicated on Python3 #1335
Comments
Ok, so I've worked this out. In However, |
Ugh, crap. Turns out fixing this breaks some other stuff. That's not ideal. |
I noticed something today that's possibly related. If I specify a File "/Users/paul/Source/Python/PythonApp/upload.py", line 911, in _gUpload
response = requests.put(signed_url, file_iterator, headers=headers, timeout=settings.UPLOAD_TIMEOUT)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 98, in put
return request('put', url, data=data, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 276, in request
prep = req.prepare()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 224, in prepare
p.prepare_body(self.data, self.files)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 349, in prepare_body
length = super_len(data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/utils.py", line 45, in super_len
return len(o)
OverflowError: long int too large to convert to int |
This bug should be resolved by #1338, so I'm going to close this issue to centralise discussion over there. Thanks so much for pointing it out! |
@Lukasa thank you! Btw, you accidentally pushed a merge conflict :( |
Oh man, so I did! I swear I fixed that! Awkward. =( Thanks for pointing it out. 🍰 |
Content-Length header is duplicated if specified on Python3, leading to 400 responses:
We need to go deeper:
That's what happens:
Two content-lengths, one 400 response :-(
On Python2 everything's OK.
The text was updated successfully, but these errors were encountered: