1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Python 3 unicode fixes.

This commit is contained in:
Jakub Roztocil
2014-04-26 17:16:11 +02:00
parent 8ec32fe7f3
commit 467d126b6c
7 changed files with 25 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ class HTTPBasicAuth(requests.auth.HTTPBasicAuth):
"""
credentials = u'%s:%s' % (self.username, self.password)
token = b64encode(credentials.encode('utf8')).strip()
token = b64encode(credentials.encode('utf8')).strip().decode('latin1')
r.headers['Authorization'] = 'Basic %s' % token
return r