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 36353eb commit 0e39cb6Copy full SHA for 0e39cb6
rest_framework/authentication.py
@@ -3,7 +3,8 @@
3
"""
4
from __future__ import unicode_literals
5
6
-import base64, six
+import base64
7
+from six import string_types
8
9
from django.contrib.auth import authenticate, get_user_model
10
from django.middleware.csrf import CsrfViewMiddleware
@@ -19,7 +20,7 @@ def get_authorization_header(request):
19
20
Hide some test client ickyness where the header can be unicode.
21
22
auth = request.META.get('HTTP_AUTHORIZATION', b'')
- if isinstance(auth, six.string_types):
23
+ if isinstance(auth, string_types):
24
# Work around django test client oddness
25
auth = auth.encode(HTTP_HEADER_ENCODING)
26
return auth
0 commit comments