Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
http2: fix mapToHeaders() with single string value#16458
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
This is for issue 16452. When 'set-cookie' header is set with an array that has only one string value, it's split into its individual characters. Fix by resetting `isArray` to false when the value is converted from an array to a string. Fixes: nodejs#16452
apapirovski left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jinwoo! Looks great :)
jinwoo commented Oct 24, 2017
Thanks, @apapirovski , for the quick approval! |
apapirovski commented Oct 24, 2017
jasnell commented Oct 25, 2017
CI looks good. |
| { | ||
| // Arrays containing a single set-cookie value are handled correctly | ||
| // (issue #16452) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can you please use the full URL: https://github.com/nodejs/node/issues/16452?
| { | ||
| // Arrays containing a single set-cookie value are handled correctly | ||
| // (issue #16452) | ||
| constheaders=Object.create({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: just {} should be fine here.
- full url for the github issue - simplify the header creation in test
jinwoo commented Oct 25, 2017
Addressed the review comments. |
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
mcollina commented Oct 26, 2017
mcollina commented Oct 26, 2017
mcollina commented Oct 26, 2017
Landed as b61a08c. |
mcollina commented Oct 26, 2017
Thanks so much for your first contribution to Node! |
This is for issue 16452. When 'set-cookie' header is set with an array that has only one string value, it's split into its individual characters. Fix by resetting `isArray` to false when the value is converted from an array to a string. Fixes: #16452 PR-URL: #16458 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This is for issue 16452. When 'set-cookie' header is set with an array that has only one string value, it's split into its individual characters. Fix by resetting `isArray` to false when the value is converted from an array to a string. Fixes: nodejs/node#16452 PR-URL: nodejs/node#16458 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This is for issue 16452. When 'set-cookie' header is set with an array that has only one string value, it's split into its individual characters. Fix by resetting `isArray` to false when the value is converted from an array to a string. Fixes: #16452 PR-URL: #16458 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This is for issue 16452. When 'set-cookie' header is set with an array that has only one string value, it's split into its individual characters. Fix by resetting `isArray` to false when the value is converted from an array to a string. Fixes: #16452 PR-URL: #16458 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This is for issue 16452. When 'set-cookie' header is set with an array that has only one string value, it's split into its individual characters. Fix by resetting `isArray` to false when the value is converted from an array to a string. Fixes: #16452 PR-URL: #16458 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This is for issue 16452. When 'set-cookie' header is set with an array that has only one string value, it's split into its individual characters. Fix by resetting `isArray` to false when the value is converted from an array to a string. Fixes: nodejs/node#16452 PR-URL: nodejs/node#16458 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
This is for issue 16452. When 'set-cookie' header is set with an array
that has only one string value, it's split into its individual
characters.
Fix by resetting
isArrayto false when the value is converted from anarray to a string.
Fixes: #16452
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
http2