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:
46ff4b3
)
Try to keep the header too if content-type is application/x-www-form-urlencoded
author
ayanamist
<ayanamist@gmail.com>
Tue, 28 Aug 2012 07:24:09 +0000
(15:24 +0800)
committer
ayanamist
<ayanamist@gmail.com>
Tue, 28 Aug 2012 07:24:09 +0000
(15:24 +0800)
requests/auth.py
patch
|
blob
|
history
diff --git
a/requests/auth.py
b/requests/auth.py
index 64d61ce48e12bd5ae67806b0d7ee2682b7b20070..8b0aeb5004816f4edecf676e45e8647ce70be41a 100644
(file)
--- a/
requests/auth.py
+++ b/
requests/auth.py
@@
-96,7
+96,8
@@
class OAuth1(AuthBase):
unicode(r.full_url), unicode(r.method), None, r.headers)
elif decoded_body != None and contenttype in (CONTENT_TYPE_FORM_URLENCODED, ''):
# Normal signing
- r.headers['Content-Type'] = CONTENT_TYPE_FORM_URLENCODED
+ if not contenttype:
+ r.headers['Content-Type'] = CONTENT_TYPE_FORM_URLENCODED
r.url, r.headers, r.data = self.client.sign(
unicode(r.full_url), unicode(r.method), r.data, r.headers)
else: