-
Notifications
You must be signed in to change notification settings - Fork 640
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
feat(http/cookie): add set-cookie headers parser #2475
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iuioiua Sorry for the delay in review. Thanks for your contribution! Left a few comments
@iuioiua Can you also sign the CLA from the above link? |
Co-authored-by: Yoshiya Hinosawa <[email protected]>
@@ -278,3 +278,19 @@ deleteCookie(headers, "deno", { path: "/", domain: "deno.land" }); | |||
``` | |||
|
|||
> Note: At the moment multiple `Set-Cookie` in a `Response` is not handled. | |||
|
|||
### getSetCookies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this API is for client side handling of cookies (This is something you use when you're interacting server from client side)
Can you describe a little more about it as other methods are for server side handling of cookies, and users might be confused about the purpose of this API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is for client-side cookie handling. I can't think of any other context in parsing the Set-Cookie
header that would be needed besides on the client.
Again, Go's cookie.go has the alike readSetCookies
function, and there's a comment in the current code that points out that such a function is needed (if I read it right).
True, it is the only client-side-based function here. But I think it is useful, and related functionality appears to be wanted by some.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iuioiua Sorry for the delay in review (again). The change mostly looks good to me. Added a few comments about small details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iuioiua Thanks for updating! LGTM
CI failures look irrelevant to this PR. I'll look into that |
Closes #1977. |
No description provided.