From ee52b4b5f711d58068a0615a9914bfdaac76a446 Mon Sep 17 00:00:00 2001 From: John Peter Yamauchi Date: Mon, 4 Jan 2021 18:41:43 -0600 Subject: [PATCH] Log if the URL changes during request --- poetry/repositories/legacy_repository.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/poetry/repositories/legacy_repository.py b/poetry/repositories/legacy_repository.py index 9e3d1e47c85..8bc9c8100b0 100644 --- a/poetry/repositories/legacy_repository.py +++ b/poetry/repositories/legacy_repository.py @@ -396,4 +396,11 @@ def _get(self, endpoint): # type: (str) -> Union[Page, None] ) return + if response.url != url: + self._log( + "Response URL {response_url} differs from request URL {url}".format( + response_url=response.url, url=url + ) + ) + return Page(response.url, response.content, response.headers)