capnweb 0.9.0 → 0.9.1
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/dist/index-bun.cjs +5 -1
- package/dist/index-bun.cjs.map +1 -1
- package/dist/index-bun.js +5 -1
- package/dist/index-bun.js.map +1 -1
- package/dist/index-workers.cjs +5 -1
- package/dist/index-workers.cjs.map +1 -1
- package/dist/index-workers.js +5 -1
- package/dist/index-workers.js.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index-workers.cjs
CHANGED
|
@@ -2340,7 +2340,11 @@ async function newHttpBatchRpcResponse(request, localMain, options) {
|
|
|
2340
2340
|
* @param options Optional RPC session options. You can also pass headers to set on the response.
|
|
2341
2341
|
*/
|
|
2342
2342
|
async function nodeHttpBatchRpcResponse(request, response, localMain, options) {
|
|
2343
|
-
if (request.method !== "POST")
|
|
2343
|
+
if (request.method !== "POST") {
|
|
2344
|
+
response.writeHead(405, "This endpoint only accepts POST requests.", options?.headers);
|
|
2345
|
+
response.end();
|
|
2346
|
+
return;
|
|
2347
|
+
}
|
|
2344
2348
|
let body = await new Promise((resolve, reject) => {
|
|
2345
2349
|
let chunks = [];
|
|
2346
2350
|
request.on("data", (chunk) => {
|