summaryrefslogtreecommitdiff
path: root/macaroonbakery/httpbakery
diff options
context:
space:
mode:
Diffstat (limited to 'macaroonbakery/httpbakery')
-rw-r--r--macaroonbakery/httpbakery/_client.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/macaroonbakery/httpbakery/_client.py b/macaroonbakery/httpbakery/_client.py
index 4fe0ab1..2510f73 100644
--- a/macaroonbakery/httpbakery/_client.py
+++ b/macaroonbakery/httpbakery/_client.py
@@ -290,12 +290,8 @@ def _prepare_discharge_hook(req, client):
Retry.count)
)
client.handle_error(error, req.url)
- # Replace the private _cookies from req as it is a copy of
- # the original cookie jar passed into the requests method and we need
- # to set the cookie for this request.
- req._cookies = client.cookies
req.headers.pop('Cookie', None)
- req.prepare_cookies(req._cookies)
+ req.prepare_cookies(client.cookies)
req.headers[BAKERY_PROTOCOL_HEADER] = \
str(bakery.LATEST_VERSION)
with requests.Session() as s: