Skip to content

Commit

Permalink
Allow parse as json without content-length
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Sep 24, 2024
1 parent 2d4398d commit fe58908
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/actors/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const actors = {
: {},
},
body: JSON.stringify({
args,
args: args ?? [],
}),
},
);
Expand Down
2 changes: 1 addition & 1 deletion src/actors/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class ActorRuntime {
return new Response(`method not found for the actor`, { status: 404 });
}
let args = [];
if (req.headers.get("content-length") !== null) {
if (req.headers.get("content-type")?.includes("application/json")) {
const { args: margs } = await req.json();
args = margs;
}
Expand Down

0 comments on commit fe58908

Please sign in to comment.