Error from body-parser when sent Content-Type
header without body
#771
Labels
bug
Something isn't working
Content-Type
header without body
#771
What version of Elysia is running?
1.0.20
What platform is your computer?
Darwin 23.6.0 arm64 arm
What steps can reproduce the bug?
DELETE
handler that does not expect a body, like:Content-Type: application/json
What is the expected behavior?
No failure, the handler will just be called
What do you see instead?
Failed to parse body as found: undefined
is returnedAdditional information
I think the fix should be - don't run the body parser if there is no content (the content-length header is absence or set to 0)
Have you try removing the
node_modules
andbun.lockb
and try again yet?yes, but when upgraded from
1.0.20
to1.1.5
I always getNot Found
on my routes, so I can't upgradeThe text was updated successfully, but these errors were encountered: