From fb1971778f0a199e65193af4bbd0a040fd3808f8 Mon Sep 17 00:00:00 2001 From: Zhaoyu Luo Date: Sun, 25 Jan 2015 18:11:22 -0600 Subject: [PATCH] Bug fix: field uri in digest authentication should not be empty when encounter http redirections --- requests/auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requests/auth.py b/requests/auth.py index b950181d..593208f3 100644 --- a/requests/auth.py +++ b/requests/auth.py @@ -103,7 +103,8 @@ class HTTPDigestAuth(AuthBase): # XXX not implemented yet entdig = None p_parsed = urlparse(url) - path = p_parsed.path + #: path is request-uri defined in RFC 2616 which should not be empty + path = p_parsed.path or "/" if p_parsed.query: path += '?' + p_parsed.query