From: Tom Moertel Date: Tue, 10 Jan 2012 23:09:49 +0000 (-0500) Subject: Fix bug in HTTP-digest auth w/ URI having query string X-Git-Tag: v0.9.2~9^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79f5d532c6a9ffcbb32b8cfcae8ec542c2699ff1;p=services%2Fpython-requests.git Fix bug in HTTP-digest auth w/ URI having query string --- diff --git a/requests/auth.py b/requests/auth.py index 4af3d6d..8ae2ec6 100644 --- a/requests/auth.py +++ b/requests/auth.py @@ -86,7 +86,9 @@ class HTTPDigestAuth(AuthBase): # XXX not implemented yet entdig = None p_parsed = urlparse(r.request.url) - path = p_parsed.path + p_parsed.query + path = p_parsed.path + if p_parsed.query: + path += '?' + p_parsed.query A1 = '%s:%s:%s' % (self.username, realm, self.password) A2 = '%s:%s' % (r.request.method, path)