Support for multiple cookies in http payload version 2.0#820
Closed
hvipana wants to merge 1 commit intobrefphp:masterfrom
Closed
Support for multiple cookies in http payload version 2.0#820hvipana wants to merge 1 commit intobrefphp:masterfrom
hvipana wants to merge 1 commit intobrefphp:masterfrom
Conversation
bd7538a to
cebc506
Compare
mnapoli
reviewed
Dec 10, 2020
|
|
||
| if (isset($cookies)) { | ||
| $response['cookies'] = $cookies; | ||
| } |
Member
There was a problem hiding this comment.
At this point I'm afraid the cookies key might be added to the v1.0 format too, and the Set-Cookies header will be removed (from v1.0 responses) 🤔
| 'httpMethod' => 'GET', | ||
| ])['cookies']; | ||
| self::assertEquals('MyCookie=FirstValue; expires=Fri, 12-Jan-2018 08:32:03 GMT; Max-Age=0; path=/hello/; domain=example.com; secure; HttpOnly', $cookieHeader[0]); | ||
| self::assertEquals('MyCookie=MyValue; expires=Fri, 12-Jan-2018 08:32:03 GMT; Max-Age=0; path=/hello/; domain=example.com; secure; HttpOnly', $cookieHeader[1]); |
Member
|
Closing until we have some news. Anyone else feel free to pick up this PR again in a new pull request. |
Member
|
FYI I've opened #841 as an alternative. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for #818
For http payload version 2.0 there is no
multiValueHeadersfield anymore. But to support multiple cookies, a newcookiesfield was introduced as described here:https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
This PR adds the
cookiesfield to the response and removes theSet-Cookieheader, that is now handled by API-Gateway v2.