Skip to content
Myr

Merge pull request #5105 from alanyee/patch-1

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

Update sessions.py

authored by Kenneth Reitz · committed by GitHub · parents 0fe6653, 47cb8ba · Browse files · 1 file+1 added−5 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+1 added−5 removed

  • other:+1 added−5 removed

1 file+1 added−5 removed

modified:requests/sessions.py+1 added-5 removed
199 unmodified lines
200 prepared_request.headers.pop(header, None)201 prepared_request.body = None202203 headers = prepared_request.headers204 try:205 del headers['Cookie']206 except KeyError:207 pass204 headers.pop('Cookie', None)205206 # Extract any cookies sent on the response to the cookiejar207 # in the new request. Because we've mutated our copied prepared208 # request, use the old one that we haven't yet touched.
58 unmodified lines
267 new_auth = get_netrc_auth(url) if self.trust_env else None268 if new_auth is not None:269 prepared_request.prepare_auth(new_auth)270274 return271272 def rebuild_proxies(self, prepared_request, proxies):273 """This method re-evaluates the proxy configuration by considering the274 environment variables. If we are redirected to a URL covered by
492 unmodified lines