aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/authentication.py
diff options
context:
space:
mode:
authorXavier Ordoquy2012-11-23 01:11:09 +0100
committerXavier Ordoquy2012-11-23 01:11:09 +0100
commitb68263fb652172c5dd74bb7a1c99f0c1230d76bc (patch)
treed255e2149aff38a4fa939e58b7a4e5c7e801a5e2 /rest_framework/authentication.py
parent4007b56457221f0d80f43c2b5303f11454fd947c (diff)
downloaddjango-rest-framework-b68263fb652172c5dd74bb7a1c99f0c1230d76bc.tar.bz2
Default encoding should probably be latin-1 as some RFC seems to imply it.
Diffstat (limited to 'rest_framework/authentication.py')
-rw-r--r--rest_framework/authentication.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py
index d283959d..15e531bf 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].encode('utf8')).decode('utf8').partition(':')
+ auth_parts = base64.b64decode(auth[1].encode('iso-8859-1')).decode('iso-8859-1').partition(':')
except TypeError:
return None