projects
/
platform
/
upstream
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
603fd42
)
Revert "If Content-Length is already set.."[1]
author
Ian Cordasco
<graffatcolmingov@gmail.com>
Mon, 25 Feb 2013 14:29:05 +0000
(09:29 -0500)
committer
Ian Cordasco
<graffatcolmingov@gmail.com>
Mon, 25 Feb 2013 14:29:05 +0000
(09:29 -0500)
This reverts commit
544d08d0f61c35358cf13b4a6b677e4e51dbbe7e
.
[1]"If Content-Length is already set, don't over ride it"
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index fe85a833c78e1e99bc18655d961b7f9a236ded89..898ed66a10f61ef3dbea85ba939914359479687d 100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-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())