Update sessions.py

-Made removing a key-value pair more modular
-Remove unneeeded return statement
This commit is contained in:
Alan Yee
2019-05-29 11:49:44 -07:00
committed by GitHub
parent 6f81e78dfe
commit 47cb8bae1a
+1 -5
View File
@@ -201,10 +201,7 @@ class SessionRedirectMixin(object):
prepared_request.body = None
headers = prepared_request.headers
try:
del headers['Cookie']
except KeyError:
pass
headers.pop('Cookie', None)
# Extract any cookies sent on the response to the cookiejar
# in the new request. Because we've mutated our copied prepared
@@ -271,7 +268,6 @@ class SessionRedirectMixin(object):
if new_auth is not None:
prepared_request.prepare_auth(new_auth)
return
def rebuild_proxies(self, prepared_request, proxies):
"""This method re-evaluates the proxy configuration by considering the