@server/next 0.20.33 → 0.20.34
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@server/next",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.34",
|
|
4
4
|
"description": "A fully-fledged web server with routing, file uploads, sessions, static files, schema validation, websockets, testing, etc.",
|
|
5
5
|
"homepage": "https://server-js.com/",
|
|
6
6
|
"repository": "https://github.com/franciscop/server-next.git",
|
package/src/context/node.js
CHANGED
|
@@ -3,6 +3,7 @@ import { define, parseHeaders } from "../helpers/index.js";
|
|
|
3
3
|
import parseBody from "./parseBody.js";
|
|
4
4
|
import parseCookies from "./parseCookies.js";
|
|
5
5
|
|
|
6
|
+
// Headers come like [title1, value1, title2, value2, ...]
|
|
6
7
|
// https://stackoverflow.com/a/54029307/938236
|
|
7
8
|
const chunkArray = (arr, size) =>
|
|
8
9
|
arr.length > size
|
|
@@ -39,7 +39,7 @@ export default async function handleRequest(handlers, ctx) {
|
|
|
39
39
|
|
|
40
40
|
// In Netlify, a non-response is perfectly valid, which would indicate
|
|
41
41
|
// the edge function to just go ahead and consume the original resource
|
|
42
|
-
if (ctx.
|
|
42
|
+
if (ctx.platform.provider === "netlify") return;
|
|
43
43
|
|
|
44
44
|
// In other environments, a non-response is wrong and we should 404 then
|
|
45
45
|
return new Response("Not Found", { status: 404 });
|