Better layout for checking.

This commit is contained in:
Cory Benfield
2014-01-30 15:11:24 +00:00
parent 7ba5a534ae
commit 326a22e888
+3 -5
View File
@@ -163,11 +163,9 @@ class SessionRedirectMixin(object):
original_parsed = urlparse(resp.request.url)
redirect_parsed = urlparse(url)
if original_parsed.hostname != redirect_parsed.hostname:
try:
del headers['Authorization']
except KeyError:
pass
if (original_parsed.hostname != redirect_parsed.hostname and
'Authorization' in headers):
del headers['Authorization']
# However, .netrc might have more auth for us. Let's get it if it
# does.