From 79f5d532c6a9ffcbb32b8cfcae8ec542c2699ff1 Mon Sep 17 00:00:00 2001 From: Tom Moertel Date: Tue, 10 Jan 2012 18:09:49 -0500 Subject: [PATCH] Fix bug in HTTP-digest auth w/ URI having query string --- requests/auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.34.1