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

Full cookie serialization #473

Merged
merged 12 commits into from
Jul 27, 2016
Merged

Full cookie serialization #473

merged 12 commits into from
Jul 27, 2016

Conversation

ketzusaka
Copy link
Contributor

This PR moves the responsibility of serializing cookie data to the Cookie struct. This is a better separation of concerns in my eyes. The Cookies serialization is updated to use the new method on Cookie, which fixes an issue where the attributes of a cookie were never set.

There is still the issue where we're folding all of the cookie properties into a single Set-Cookie header, which doesn't seem to work in some browsers; that fix will come in a subsequent PR.

@loganwright loganwright temporarily deployed to vapor-build-pr-473 July 21, 2016 15:30 Inactive
@tanner0101 tanner0101 added the enhancement New feature or request label Jul 21, 2016
@tanner0101 tanner0101 added this to the 0.15 milestone Jul 21, 2016
@loganwright loganwright temporarily deployed to vapor-build-pr-473 July 21, 2016 21:10 Inactive
@tanner0101
Copy link
Member

tanner0101 commented Jul 21, 2016

@ketzusaka Do you know which browsers don't work with the single set-cookie header?

@ketzusaka
Copy link
Contributor Author

@tannernelson I tested specifically on Chrome. I don't believe it was working in safari either as things weren't operating as I expected there, but I'd have to double check on that.

Also, the format for the Expires attribute appears to require a format that would break multiple cookies in a single Set-Cookie header, and that is why it is recommended to use multiple header rows.

@loganwright loganwright temporarily deployed to vapor-build-pr-473 July 25, 2016 15:23 Inactive
@loganwright loganwright temporarily deployed to vapor-build-pr-473 July 25, 2016 22:25 Inactive
@loganwright loganwright temporarily deployed to vapor-build-pr-473 July 27, 2016 02:30 Inactive
@loganwright loganwright temporarily deployed to vapor-build-pr-473 July 27, 2016 03:11 Inactive
@loganwright
Copy link
Member

@ketzusaka @tannernelson I added a mini commit on here that will give us multi cookie support until we implement something more comprehensive.

This was tested on Chrome and Safari 👍

@ketzusaka
Copy link
Contributor Author

oh nice, surprised that works haha

@loganwright loganwright temporarily deployed to vapor-build-pr-473 July 27, 2016 14:17 Inactive
@loganwright loganwright merged commit de41d75 into master Jul 27, 2016
@loganwright loganwright deleted the full-cookie-serialization branch July 27, 2016 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants