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 3d3b064 commit c22b92aCopy full SHA for c22b92a
rest_framework/authentication.py
@@ -19,7 +19,7 @@ def get_authorization_header(request):
19
Hide some test client ickyness where the header can be unicode.
20
"""
21
auth = request.META.get('HTTP_AUTHORIZATION', b'')
22
- if isinstance(auth, type('')):
+ if isinstance(auth, str):
23
# Work around django test client oddness
24
auth = auth.encode(HTTP_HEADER_ENCODING)
25
return auth
0 commit comments