Permalink
Browse files

Respect trust_env on redirect.

  • Loading branch information...
1 parent 326a22e commit d9f34c6848b9b313beefa7d3ce05f52fdea28c27 @Lukasa Lukasa committed Jan 31, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 requests/sessions.py
View
@@ -169,7 +169,7 @@ def resolve_redirects(self, resp, req, stream=False, timeout=None,
# However, .netrc might have more auth for us. Let's get it if it
# does.
- new_auth = get_netrc_auth(url)
+ new_auth = get_netrc_auth(url) if self.trust_env else None
if new_auth is not None:
prepared_request.prepare_auth(new_auth)

0 comments on commit d9f34c6

Please sign in to comment.