Disable cookie processing #8056
Unanswered
Kaspek2480
asked this question in
Q&A
Replies: 3 comments 1 reply
-
I think just subclass the regular cookie jar and make update_cookies() a no-op. From a brief glance at the code, I think that'll work. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Okay solved using that code class EmptyCookieJar(aiohttp.cookiejar.AbstractCookieJar):
def __len__(self):
pass
def __iter__(self):
pass
def clear(self, predicate: Optional[ClearCookiePredicate] = None) -> None:
pass
def clear_domain(self, domain: str) -> None:
pass
def update_cookies(self, cookies: LooseCookies, response_url: URL = URL()) -> None:
pass
def filter_cookies(self, request_url: URL) -> "BaseCookie[str]":
return BaseCookie() and then aiohttp.ClientSession(connector_owner=False, cookie_jar=EmptyCookieJar()) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have another problem, when i used custom cookie jar, and i update cookies manually by fetching response, the thing is not working when it auto redirects - what can i do in that case? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i want to process cookies per requests
I use one ClientSession to use pooling
I have my own
Session
implementation and i handle cookies manually but the problem is some cookies are shared between requestsHere's how i pass my own cookies to request:
Beta Was this translation helpful? Give feedback.
All reactions