Skip to content
Myr

Unicode fix for py3

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ib Lundgren · committed by Ib Lundgren · parent c24665b · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:requests/auth.py+4 added-4 removed
96 unmodified lines
97 # >>> d = {u'a':u'foo'}98 # >>> d['a'] = 'foo'99 # >>> d100 # { u'a' : 'foo' }101 u_header = unicode('Authorization')101 if u'Authorization' in r.headers:102 auth_header = r.headers[u'Authorization'].encode('utf-8')103 del r.headers[u'Authorization']102 if u_header in r.headers: 103 auth_header = r.headers[u_header].encode('utf-8')104 del r.headers[u_header]105 r.headers['Authorization'] = auth_header105 print r.headers106107 return r108109
119 unmodified lines