mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
aiohttp: Fix next_url redirect for absolute paths
This commit is contained in:
committed by
Kevin McCarthy
parent
69cecdbda7
commit
e868b64922
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user