Skip to content
Myr

self.config.get('trust_env')

Before adoption: this commit came in with the history the project adopted, so no landing records it.

just for @mitsuhiko

authored by Kenneth Reitz · committed by Kenneth Reitz · parent e15ae8f · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:requests/models.py+4 added-4 removed
102 unmodified lines
103 self.proxies = dict(proxies or [])104105 # If no proxies are given, allow configuration by environment variables106 # HTTP_PROXY and HTTPS_PROXY.107 if not self.proxies:107 if not self.proxies and self.config.get('trust_env'):108 if 'HTTP_PROXY' in os.environ:109 self.proxies['http'] = os.environ['HTTP_PROXY']110 if 'HTTPS_PROXY' in os.environ:111 self.proxies['https'] = os.environ['HTTPS_PROXY']
333 unmodified lines
445 if (content_type) and (not 'content-type' in self.headers):446 self.headers['Content-Type'] = content_type447448 # Use .netrc auth if none was provided.449 if not self.auth:449 if not self.auth and self.config.get('trust_env'):450 self.auth = get_netrc_auth(url)451452 if self.auth:453 if isinstance(self.auth, tuple) and len(self.auth) == 2:
32 unmodified lines
486 if self.verify is not True:487 cert_loc = self.verify488489 # Look for configuration.490 if not cert_loc:490 if not cert_loc and self.config.get('trust_env'):491 cert_loc = os.environ.get('REQUESTS_CA_BUNDLE')492493 # Curl compatiblity.494 if not cert_loc:494 if not cert_loc and self.config.get('trust_env'):495 cert_loc = os.environ.get('CURL_CA_BUNDLE')496497 # Use the awesome certifi list.498 if not cert_loc:
308 unmodified lines