Skip to content

Commit

Permalink
Merge pull request psf#2917 from matt-jordan/qop
Browse files Browse the repository at this point in the history
requests/auth: Handle an empty 'qop' attribute in an Authenticate challenge
  • Loading branch information
sigmavirus24 committed Dec 6, 2015
2 parents 40ce366 + 5c19d3e commit e48fea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion requests/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def sha_utf8(x):
if _algorithm == 'MD5-SESS':
HA1 = hash_utf8('%s:%s:%s' % (HA1, nonce, cnonce))

if qop is None:
if not qop:
respdig = KD(HA1, "%s:%s" % (nonce, HA2))
elif qop == 'auth' or 'auth' in qop.split(','):
noncebit = "%s:%s:%s:%s:%s" % (
Expand Down

0 comments on commit e48fea7

Please sign in to comment.