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

fix(runtime-handler): using set-cookie now sets cookie header #332

Merged
merged 1 commit into from
Jul 27, 2021

Conversation

philnash
Copy link
Contributor

Following the implementation of the Functions runtime-handler, the Response object
sets the Set-Cookie header to [] if there are no cookies set. If you then set a
header with the key 'set-cookie' (or any other capitalisation) it will be eventually
overridden by the empty array under Set-Cookie (since it is also added to the headers last).
To fix this all cookies are set under the key 'Set-Cookie'.

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

Following the implementation of the Functions runtime-handler, the Response object
sets the Set-Cookie header to [] if there are no cookies set. If you then set a
header with the key 'set-cookie' (or any other capitalisation) it will be eventually
overridden by the empty array under Set-Cookie (since it is also added to the headers last).
To fix this all cookies are set under the key 'Set-Cookie'.
@philnash philnash requested a review from dkundel July 27, 2021 04:37
@dkundel dkundel merged commit 6f65bc3 into features/handler-1.2.0 Jul 27, 2021
dkundel added a commit that referenced this pull request Oct 14, 2021
* feat(runtime-handler): handle incoming headers and cookies (#293)

* feat(handler): update header and cookie support for Response (#296)

* feat(runtime-types): add cookie/header support for types (#297)

* build: adjust dependency imports for successful build (#314)

* chore(runtime-handler): add artifical rc-version bump

* chore(release): publish %s

 - [email protected]
 - @twilio-labs/[email protected]
 - @twilio/[email protected]
 - @twilio-labs/[email protected]
 - [email protected]

* fix(runtime-handler): using set-cookie now sets cookie header (#332)

* chore(release): publish %s

 - @twilio/[email protected]

* chore(release): publish %s

 - @twilio/[email protected]

* Update package.json

* Update package.json

Co-authored-by: Phil Nash <[email protected]>
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.

2 participants