Skip to content

Commit

Permalink
[fix] Use headers.raw() on split_headers (#4096)
Browse files Browse the repository at this point in the history
* use headers.raw() on `split_headers`

* add changeset
  • Loading branch information
JeanJPNM authored Feb 24, 2022
1 parent 93d22b7 commit c1bf43e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/three-elephants-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-netlify': patch
---

Fix incorrect set-cookie header handling on adapter-netlify
3 changes: 2 additions & 1 deletion packages/adapter-netlify/src/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function split_headers(headers) {

headers.forEach((value, key) => {
if (key === 'set-cookie') {
m[key] = value.split(', ');
// @ts-expect-error (headers.raw() is non-standard)
m[key] = headers.raw()[key];
} else {
h[key] = value;
}
Expand Down

0 comments on commit c1bf43e

Please sign in to comment.