diff options
author | Ib Lundgren <ib.lundgren@gmail.com> | 2013-07-09 17:52:00 +0100 |
---|---|---|
committer | Ib Lundgren <ib.lundgren@gmail.com> | 2013-07-09 17:52:00 +0100 |
commit | 8f055a33055e6902c1ec004386a740ac6bea6885 (patch) | |
tree | d03634d1138d3fdca44fc41f15ba5798757fb23d /oauthlib/oauth1 | |
parent | 5a9d57dd5f179102ed95cbc75986f913bb6fb326 (diff) | |
download | oauthlib-8f055a33055e6902c1ec004386a740ac6bea6885.tar.gz |
Auth scheme lower and short header test.
Diffstat (limited to 'oauthlib/oauth1')
-rw-r--r-- | oauthlib/oauth1/rfc5849/utils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/oauthlib/oauth1/rfc5849/utils.py b/oauthlib/oauth1/rfc5849/utils.py index ecd1755..1b452e7 100644 --- a/oauthlib/oauth1/rfc5849/utils.py +++ b/oauthlib/oauth1/rfc5849/utils.py @@ -91,9 +91,8 @@ def parse_http_list(u): def parse_authorization_header(authorization_header): """Parse an OAuth authorization header into a list of 2-tuples""" - auth_scheme = 'OAuth ' - if authorization_header[:len(auth_scheme)].lower().startswith( - auth_scheme.lower()): + auth_scheme = 'OAuth '.lower() + if authorization_header[:len(auth_scheme)].lower().startswith(auth_scheme): items = parse_http_list(authorization_header[len(auth_scheme):]) try: return list(parse_keqv_list(items).items()) |