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:
c24665b
)
Unicode fix for py3
author
Ib Lundgren
<ib.lundgren@gmail.com>
Tue, 15 May 2012 15:37:15 +0000
(17:37 +0200)
committer
Ib Lundgren
<ib.lundgren@gmail.com>
Tue, 15 May 2012 15:37:15 +0000
(17:37 +0200)
requests/auth.py
patch
|
blob
|
history
diff --git
a/requests/auth.py
b/requests/auth.py
index c9a1a02f4296396cd08ed81c8d2c4ad2d0439bdc..e636b72402ef8749d96ccf8d224c762b65b8582c 100644
(file)
--- a/
requests/auth.py
+++ b/
requests/auth.py
@@
-98,11
+98,11
@@
class OAuth1(AuthBase):
# >>> d['a'] = 'foo'
# >>> d
# { u'a' : 'foo' }
- if u'Authorization' in r.headers:
- auth_header = r.headers[u'Authorization'].encode('utf-8')
- del r.headers[u'Authorization']
+ u_header = unicode('Authorization')
+ if u_header in r.headers:
+ auth_header = r.headers[u_header].encode('utf-8')
+ del r.headers[u_header]
r.headers['Authorization'] = auth_header
- print r.headers
return r