using HttpClient(Apache) with the default AcceptAl...
# ktor
t
using HttpClient(Apache) with the default AcceptAllCookiesStorage. Are cookies shared between a.com and b.a.com?
e
The scope of the cookie header is restricted to request host.
t
I thought so. Is there a easier way to manually handle cookies than parsing response.headers and appending to another request?
e
You could access to
CookieStorage
with
feature
method and copy cookies between the domains
t
like this?
(client.feature(HttpCookies) as CookiesStorage).addCookie("<http://domain.com|domain.com>", cookie)
no 🙂 this cast is wrong
e
Look's like you only could save
cookiesStorage
from the config builder and modify later. But it looks creepy. Let's file an issue about that.
t
thank you
e
No problem 🙂
t
previously you stated “The scope of the cookie header is restricted to request host.” however I have read that if a cookie’s domain starts with
.
then it should also be available for requests to any subdomain
t
yes, I have just read this
e
However we could support it in ktor
t
I am trying to get a response from a stack overflow chat endpoint, however it is not documented and everything I try gives a vague 404 response. Messing with the cookies was my last resort but it has not helped. I can’t say where the issue is so there might not be an issue with ktor at all
e
Could you share the request configuration?
t
not easily, it is a pretty big mess