Skip to content

Commit

Permalink
Log if the URL changes during request
Browse files Browse the repository at this point in the history
  • Loading branch information
jpyams committed Jan 5, 2021
1 parent 6fc00ec commit ee52b4b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions poetry/repositories/legacy_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit ee52b4b

Please sign in to comment.