-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect loop #56
Comments
by default aiohttp.request does not share cookies. you can use custom connector object with share_cookies turned on. something like that:
another question should we turn cookies on by default? and should we use global connector object instead of new object for each request() call? |
I think cookies should be disabled by default. |
ok, sounds good. |
Aiohttp gets stuck in a loop as it doesn't respect set-cookie headers in redirect responses. If you request A which redirects to B, B then sets a cookie and redirects to A. A will see no cookie has been sent and so redirect you back to B. This is not very efficient as it ends up making 10 requests by default before returning.
https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/client.py#L126
The text was updated successfully, but these errors were encountered: