mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Revert "If Content-Length is already set.."[1]
This reverts commit 544d08d0f6.
[1]"If Content-Length is already set, don't over ride it"
This commit is contained in:
@@ -386,8 +386,6 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
|
||||
self.body = body
|
||||
|
||||
def prepare_content_length(self, body):
|
||||
if self.headers.get('Content-Length'):
|
||||
return
|
||||
if hasattr(body, 'seek') and hasattr(body, 'tell'):
|
||||
body.seek(0, 2)
|
||||
self.headers['Content-Length'] = str(body.tell())
|
||||
|
||||
Reference in New Issue
Block a user