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:
d23c4b9
)
fix base64 encoding for httpbasic
author
Kenneth Reitz
<me@kennethreitz.com>
Sun, 23 Oct 2011 15:14:59 +0000
(11:14 -0400)
committer
Kenneth Reitz
<me@kennethreitz.com>
Sun, 23 Oct 2011 15:14:59 +0000
(11:14 -0400)
requests/auth.py
patch
|
blob
|
history
diff --git
a/requests/auth.py
b/requests/auth.py
index
0a0402b
..
3a978b1
100644
(file)
--- a/
requests/auth.py
+++ b/
requests/auth.py
@@
-7,7
+7,7
@@
requests.auth
This module contains the authentication handlers for Requests.
"""
-from base64 import b
ase64
+from base64 import b
64encode
def http_basic(r, username, password):
"""Attaches HTTP Basic Authentication to the given Request object.
@@
-17,7
+17,7
@@
def http_basic(r, username, password):
username = str(username)
password = str(password)
- auth_s = b
ase64
('%s:%s' % (username, password))
+ auth_s = b
64encode
('%s:%s' % (username, password))
r.headers['Authorization'] = ('Basic %s' % auth_s)
return r