capnweb 0.0.0-79bc296 → 0.0.0-7fcc52a
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-bun.cjs
CHANGED
|
@@ -2307,7 +2307,11 @@ async function newHttpBatchRpcResponse(request, localMain, options) {
|
|
|
2307
2307
|
* @param options Optional RPC session options. You can also pass headers to set on the response.
|
|
2308
2308
|
*/
|
|
2309
2309
|
async function nodeHttpBatchRpcResponse(request, response, localMain, options) {
|
|
2310
|
-
if (request.method !== "POST")
|
|
2310
|
+
if (request.method !== "POST") {
|
|
2311
|
+
response.writeHead(405, "This endpoint only accepts POST requests.", options?.headers);
|
|
2312
|
+
response.end();
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2311
2315
|
let body = await new Promise((resolve, reject) => {
|
|
2312
2316
|
let chunks = [];
|
|
2313
2317
|
request.on("data", (chunk) => {
|