-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Last set-cookie headers on a page overwrites the ones before #43
Comments
@erikthorselius Can you give a more concrete example which allows us to repro/test and fix the problem? |
I guess the problem happens here: babashka.curl/src/babashka/curl.clj Line 202 in 5e8daab
Should we instead of creating a map, create a seq of map-entries/vectors? It will be a breaking change, but maybe for the good? Let's investigate how other clients do this (e.g. clj-http). /cc @lispyclouds |
clj-http-lite:
|
Hato: Not sure what it does there... |
clj-http, same as clj-http-lite: I guess we would be safe doing the same as people should already be relatively used to this behavior and we would not break anything. |
I guess httpkit has the same bug: |
Let's go ahead with the clj-http/lite approach. |
Wow you are fast! Sorry for my short description and it looks like you figured it out. I tried to get a session cookie from the headers but it was only one set-cookie header in the headers map. But if I curl the page directly it was two set-cookie headers and the session was the first so it was overwritten by the second. |
Sounds good to me too! Would be consistent with the query params impl now 😄 |
How's that? |
Ah yeah I misread the clj-http impl as the way we handle the same named query params by passing a vector of vectors. But now that I read it again its different. Also this is about the response headers not the request ones. |
If a homepage has multiple
set-cookes
headers it is only the lastset-cookie
is in the response :header map.The text was updated successfully, but these errors were encountered: