Skip to content
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

Merged
merged 6 commits into from
Aug 13, 2022
Merged

feat(http/cookie): add set-cookie headers parser #2475

merged 6 commits into from
Aug 13, 2022

Conversation

iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Jul 27, 2022

No description provided.

@iuioiua iuioiua requested review from bartlomieju and kt3k as code owners July 27, 2022 10:55
@CLAassistant
Copy link

CLAassistant commented Jul 27, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@kt3k kt3k left a 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

@kt3k
Copy link
Member

kt3k commented Aug 3, 2022

@iuioiua Can you also sign the CLA from the above link?

@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@kt3k kt3k left a 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

Copy link
Member

@kt3k kt3k left a 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

@kt3k
Copy link
Member

kt3k commented Aug 12, 2022

CI failures look irrelevant to this PR. I'll look into that

@iuioiua
Copy link
Contributor Author

iuioiua commented Aug 14, 2022

Closes #1977.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants