mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
aiohttp: Update cookies with redirection responses
This commit is contained in:
committed by
Kevin McCarthy
parent
e868b64922
commit
20fb283e97
@@ -248,6 +248,8 @@ def vcr_request(cassette, real_request):
|
||||
if cassette.can_play_response_for(vcr_request):
|
||||
log.info("Playing response for {} from cassette".format(vcr_request))
|
||||
response = play_responses(cassette, vcr_request)
|
||||
for redirect in response.history:
|
||||
self._cookie_jar.update_cookies(redirect.cookies, redirect.url)
|
||||
self._cookie_jar.update_cookies(response.cookies, response.url)
|
||||
return response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user