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:
4cac9f0
)
Always add Content-Length to HTTP PATCH.
author
Johnny Goodnow
<j.goodnow29@gmail.com>
Fri, 25 Jan 2013 20:07:24 +0000
(12:07 -0800)
committer
Johnny Goodnow
<j.goodnow29@gmail.com>
Fri, 25 Jan 2013 20:07:24 +0000
(12:07 -0800)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
b05ef25
..
691f049
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-392,7
+392,7
@@
class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
body.seek(0, 0)
elif body is not None:
self.headers['Content-Length'] = str(len(body))
- elif self.method in ('POST', 'PUT'):
+ elif self.method in ('POST', 'PUT'
, 'PATCH'
):
self.headers['Content-Length'] = '0'
def prepare_auth(self, auth):