-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: hack: support the "Partitioned" flag on VCAP_ID cookies
The `Partitioned` flag is used for cookies that are set on web sites embedded via iframes. The cookie is then available only in combination of the host site and the embedded site. Golang's `http.Cookie` type does not yet support the `Partitioned` flag, but Google Chrome is already testing mandatory support and rejecting/omitting cookies without it for 1% of users via A/B roll-out. The implementation wraps the `http.Cookie` and extends it with the `Partitioned` field. This field is then used to forward the raw cookie string when creating the derived VCAP_ID cookies for sticky sessions. Once the Golang standard library supports the `Partitioned` flag, this wrapper can just be removed. A test that checks the `Unparsed` section of the `http.Cookie` will ensure that the tests will fail once the `Partitioned` flag is supported by the Golang standard library.
- Loading branch information
Showing
2 changed files
with
51 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters