Commit 2c2b658
http2: fix mapToHeaders() with single string value
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 <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>1 parent 568d614 commit 2c2b658Copy full SHA for 2c2b658
File tree
Expand file treeCollapse file tree
2 files changed
+14
-1
lines changedOpen diff view settings
Filter options
- lib/internal/http2
- test/parallel
Expand file treeCollapse file tree
2 files changed
+14
-1
lines changedOpen diff view settings
Collapse file
+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
403 | 403 | |
404 | 404 | |
405 | 405 | |
406 | | - |
| 406 | + |
407 | 407 | |
408 | 408 | |
409 | 409 | |
410 | 410 | |
411 | 411 | |
412 | 412 | |
| 413 | + |
413 | 414 | |
414 | 415 | |
415 | 416 | |
|
Collapse file
test/parallel/test-http2-util-headers-list.js
Copy file name to clipboardExpand all lines: test/parallel/test-http2-util-headers-list.js+12Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
154 | 154 | |
155 | 155 | |
156 | 156 | |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
157 | 169 | |
158 | 170 | |
159 | 171 | |
|
0 commit comments