@whatwg-node/server 0.8.9 → 0.8.10-alpha-20230613171450-41cad7c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/utils.js +2 -2
- package/cjs/uwebsockets.js +1 -1
- package/esm/utils.js +2 -2
- package/esm/uwebsockets.js +1 -1
- package/package.json +2 -2
package/cjs/utils.js
CHANGED
|
@@ -149,9 +149,9 @@ function getHeadersArray(headers) {
|
|
|
149
149
|
const headersArray = [];
|
|
150
150
|
headers.forEach((value, key) => {
|
|
151
151
|
if (key === 'set-cookie') {
|
|
152
|
-
const setCookieValues = value.split('
|
|
152
|
+
const setCookieValues = value.split(',');
|
|
153
153
|
setCookieValues.forEach(setCookieValue => {
|
|
154
|
-
headersArray.push('set-cookie', setCookieValue);
|
|
154
|
+
headersArray.push('set-cookie', setCookieValue.trim());
|
|
155
155
|
});
|
|
156
156
|
return;
|
|
157
157
|
}
|
package/cjs/uwebsockets.js
CHANGED
|
@@ -43,7 +43,7 @@ async function sendResponseToUwsOpts({ res, response }) {
|
|
|
43
43
|
});
|
|
44
44
|
response.headers.forEach((value, key) => {
|
|
45
45
|
// content-length causes an error with Node.js's fetch
|
|
46
|
-
if (key
|
|
46
|
+
if (key !== 'content-length') {
|
|
47
47
|
res.cork(() => {
|
|
48
48
|
res.writeHeader(key, value);
|
|
49
49
|
});
|
package/esm/utils.js
CHANGED
|
@@ -139,9 +139,9 @@ function getHeadersArray(headers) {
|
|
|
139
139
|
const headersArray = [];
|
|
140
140
|
headers.forEach((value, key) => {
|
|
141
141
|
if (key === 'set-cookie') {
|
|
142
|
-
const setCookieValues = value.split('
|
|
142
|
+
const setCookieValues = value.split(',');
|
|
143
143
|
setCookieValues.forEach(setCookieValue => {
|
|
144
|
-
headersArray.push('set-cookie', setCookieValue);
|
|
144
|
+
headersArray.push('set-cookie', setCookieValue.trim());
|
|
145
145
|
});
|
|
146
146
|
return;
|
|
147
147
|
}
|
package/esm/uwebsockets.js
CHANGED
|
@@ -38,7 +38,7 @@ export async function sendResponseToUwsOpts({ res, response }) {
|
|
|
38
38
|
});
|
|
39
39
|
response.headers.forEach((value, key) => {
|
|
40
40
|
// content-length causes an error with Node.js's fetch
|
|
41
|
-
if (key
|
|
41
|
+
if (key !== 'content-length') {
|
|
42
42
|
res.cork(() => {
|
|
43
43
|
res.writeHeader(key, value);
|
|
44
44
|
});
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatwg-node/server",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.10-alpha-20230613171450-41cad7c",
|
|
4
4
|
"description": "Fetch API compliant HTTP Server adapter",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@whatwg-node/fetch": "
|
|
7
|
+
"@whatwg-node/fetch": "0.9.6-alpha-20230613171450-41cad7c",
|
|
8
8
|
"tslib": "^2.3.1"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|