1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 09:13:23 +00:00

aiohttp: Fix next_url redirect for absolute paths

This commit is contained in:
Paulo Romeira
2020-06-17 19:03:09 -03:00
committed by Kevin McCarthy
parent 69cecdbda7
commit e868b64922

View File

@@ -121,7 +121,7 @@ def play_responses(cassette, vcr_request):
if "location" not in response.headers:
break
next_url = URL(response.url).with_path(response.headers["location"])
next_url = URL(response.url).join(URL(response.headers["location"]))
# Make a stub VCR request that we can then use to look up the recorded
# VCR request saved to the cassette. This feels a little hacky and