mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Do not redirect on 304 for aiohttp
This commit is contained in:
@@ -92,6 +92,9 @@ def play_responses(cassette, vcr_request):
|
||||
# If we're following redirects, continue playing until we reach
|
||||
# our final destination.
|
||||
while 300 <= response.status <= 399:
|
||||
if "location" not in response.headers:
|
||||
break
|
||||
|
||||
next_url = URL(response.url).with_path(response.headers["location"])
|
||||
|
||||
# Make a stub VCR request that we can then use to look up the recorded
|
||||
|
||||
Reference in New Issue
Block a user