projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34f6088
)
Fixed.
author
Alexander Nelzin
<asnelzin@gmail.com>
Wed, 12 Nov 2014 12:35:27 +0000
(15:35 +0300)
committer
Alexander Nelzin
<asnelzin@gmail.com>
Wed, 12 Nov 2014 12:35:27 +0000
(15:35 +0300)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index 3f6a4f92ef55b1c4b1fcc5d5a6b015e49ef9b27c..2370b67f6870a714be8b83b7d0c1dbce4b3554dc 100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-472,7
+472,7
@@
class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
l = super_len(body)
if l:
self.headers['Content-Length'] = builtin_str(l)
- elif
self.method not in ('GET', 'HEAD'
):
+ elif
(self.method not in ('GET', 'HEAD')) and (self.headers.get('Content-Length') is None
):
self.headers['Content-Length'] = '0'
def prepare_auth(self, auth, url=''):