-
-
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
Discarding cookies in client session #957
Comments
You can replace |
Sorry missed that property.
Would be nice. Because I don't want to pay for Alternatively, there might be an option to replace |
Fixed by #963 |
Looks great. Thanks! |
It looks like there is no good way to discard cookies after each request.
In previous versions of aiohttp I've just used
aiohttp.request(connector=...)
for requests, but it's deprecated now. And it looks like the only way to do connections is to makeClientSession
.But
ClientSession
has hardcoded cookie processing which I don't need at all. I supplyCookie
header value to theclient_session.request()
. And it gots replaced as soon as first response returnsSet-Cookie
(I meanCookieJar
replaces the header on the all following requests), as far as I can observe.Currently, I can fix it by:
But it looks like too ugly and wrong.
The overall use case is similar to a simple proxy: I maintain multiple server connections and send requests to the backends using a single ClientSession (to maintain a single connection pool for all incoming connections). So
CookieJar
's implementation handling is just wrong for it.Any good ideas how to achieve this using aiohttp?
The text was updated successfully, but these errors were encountered: