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(cookie): handle previously set-cookie headers #117

Merged
merged 1 commit into from
May 26, 2020

Conversation

vvo
Copy link
Owner

@vvo vvo commented May 26, 2020

This commit fixes a case where previous set-cookie headers were ignored through
the request lifecycle. This is now fixed and handles both single and multiple
set-cookie header values. Since in Node.js you can do:

res.setHeader("set-cookie", "name=value"); and
res.setHeader("set-cookie", ["name=value", "name2=value2"])

fixes #112

This commit fixes a case where previous set-cookie headers were ignored through
the request lifecycle. This is now fixed and handles both single and multiple
set-cookie header values. Since in Node.js you can do:

res.setHeader("set-cookie", "name=value"); and
res.setHeader("set-cookie", ["name=value", "name2=value2"])

fixes #112
@codecov
Copy link

codecov bot commented May 26, 2020

Codecov Report

Merging #117 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #117   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           63        64    +1     
  Branches        23        24    +1     
=========================================
+ Hits            63        64    +1     
Impacted Files Coverage Δ
lib/index.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 774f300...0a15ba9. Read the comment docs.

@vvo vvo merged commit 81c156d into master May 26, 2020
@vvo vvo deleted the fix/handle-previous-set-cookie branch May 26, 2020 13:34
@vvo
Copy link
Owner Author

vvo commented May 26, 2020

🎉 This PR is included in version 4.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

req.session.save() overrides existing Set-Cookie header values
1 participant