Skip to content

Commit 10a080d

Browse files
committed
Merge pull request #4041 from linovia/bug/fix_correct_string_type
Fix regression introduced by #4035
2 parents 019c6db + 29a2e54 commit 10a080d

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 text_types
10+
from django.utils.six import text_type
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, text_types):
23+
if isinstance(auth, text_type):
2424
# Work around django test client oddness
2525
auth = auth.encode(HTTP_HEADER_ENCODING)
2626
return auth

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy