web/request.py
changeset 10779 6cef304aca4c
parent 10733 9f66ac5eec1e
child 10848 e905c95ccdfb
--- a/web/request.py	Tue Oct 06 11:14:15 2015 +0200
+++ b/web/request.py	Tue Oct 06 11:15:56 2015 +0200
@@ -846,7 +846,7 @@
             scheme = scheme.lower()
             try:
                 assert scheme == "basic"
-                user, passwd = base64.decodestring(rest).split(":", 1)
+                user, passwd = base64.decodestring(rest.encode('ascii')).split(b":", 1)
                 # XXX HTTP header encoding: use email.Header?
                 return user.decode('UTF8'), passwd
             except Exception as ex: