Skip to content

Commit 019c6db

Browse files
xordoquytomchristie
authored andcommitted
Fix the string_types / text_types confusion introduced in #4025 (#4035)
1 parent 78e4ea0 commit 019c6db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest_framework/authentication.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from django.contrib.auth import authenticate, get_user_model
99
from django.middleware.csrf import CsrfViewMiddleware
10-
from django.utils.six import string_types
10+
from django.utils.six import text_types
1111
from django.utils.translation import ugettext_lazy as _
1212

1313
from rest_framework import HTTP_HEADER_ENCODING, exceptions
@@ -20,7 +20,7 @@ def get_authorization_header(request):
2020
Hide some test client ickyness where the header can be unicode.
2121
"""
2222
auth = request.META.get('HTTP_AUTHORIZATION', b'')
23-
if isinstance(auth, string_types):
23+
if isinstance(auth, text_types):
2424
# Work around django test client oddness
2525
auth = auth.encode(HTTP_HEADER_ENCODING)
2626
return auth

0 commit comments

Comments
 (0)