From 606c20f012c5a1fdcfd661eb280bab22b94afcf5 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Thu, 22 Nov 2012 02:08:00 +0100 Subject: 6 first tests passes under python 3.2 --- rest_framework/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rest_framework/authentication.py') diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index 4b18b40c..d283959d 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -40,7 +40,7 @@ class BasicAuthentication(BaseAuthentication): auth = request.META['HTTP_AUTHORIZATION'].split() if len(auth) == 2 and auth[0].lower() == "basic": try: - auth_parts = base64.b64decode(auth[1]).partition(':') + auth_parts = base64.b64decode(auth[1].encode('utf8')).decode('utf8').partition(':') except TypeError: return None -- cgit v1.2.3