mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
.netrc settings shouldn't blow away explicit auth settings on a session
This commit is contained in:
@@ -289,8 +289,8 @@ class Session(SessionRedirectMixin):
|
||||
for (k, v) in env_proxies.items():
|
||||
proxies.setdefault(k, v)
|
||||
|
||||
# Set environment's basic authentication.
|
||||
if not auth:
|
||||
# Set environment's basic authentication if not explicitly set.
|
||||
if not auth and not self.auth:
|
||||
auth = get_netrc_auth(url)
|
||||
|
||||
# Look for configuration.
|
||||
|
||||
Reference in New Issue
Block a user