We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78e4ea0 commit 019c6dbCopy full SHA for 019c6db
rest_framework/authentication.py
@@ -7,7 +7,7 @@
7
8
from django.contrib.auth import authenticate, get_user_model
9
from django.middleware.csrf import CsrfViewMiddleware
10
-from django.utils.six import string_types
+from django.utils.six import text_types
11
from django.utils.translation import ugettext_lazy as _
12
13
from rest_framework import HTTP_HEADER_ENCODING, exceptions
@@ -20,7 +20,7 @@ def get_authorization_header(request):
20
Hide some test client ickyness where the header can be unicode.
21
"""
22
auth = request.META.get('HTTP_AUTHORIZATION', b'')
23
- if isinstance(auth, string_types):
+ if isinstance(auth, text_types):
24
# Work around django test client oddness
25
auth = auth.encode(HTTP_HEADER_ENCODING)
26
return auth
0 commit comments