Skip to content
Myr

Fixed redirect loop (#734)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* fixed redirect loop * linted with flake8 * linted with flake8

authored by Yurii Ohorodnik · committed by Tom Christie · parent c842c8f · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:httpx/client.py+2 added-1 removed
615 unmodified lines
616617 while True:618 if len(history) > self.max_redirects:619 raise TooManyRedirects()620 if request.url in (response.url for response in history):620 urls = ((resp.request.method, resp.url) for resp in history)621 if (request.method, request.url) in urls:622 raise RedirectLoop()623624 response = await self.send_handling_auth(625 request, auth=auth, timeout=timeout, history=history
303 unmodified lines