svelte-adapter-bun
svelte-adapter-bun copied to clipboard
Does not support BODY_SIZE_LIMIT
Came across this while developing on Bun, however, my web app needs to let users upload large files. Currently, this adapter will drop requests with a large body, although there doesn't seem to be any explicit check in the source code.
Could this be a limitation of whatever this adapter is using to prepare request handling? Note that there is no error server-side, the connection is just closed by the server (NS_ERROR_NET_RESET).
In the @sveltejs/adapter-node, the following lines handle the body:
https://github.com/sveltejs/kit/blob/c175335f48639eaad8274cb628c6f6549ea4ef7b/packages/kit/src/exports/node/index.js#L6C1-L96C2
Any ideas?
Bun.serve has a default maxRequestBodySize of 128MB, currently looks like this is not an editable setting from the adapter. Should be a pretty fast implement though.
Bun.serve has a default maxRequestBodySize of 128MB, currently looks like this is not an editable setting from the adapter. Should be a pretty fast implement though.
Thanks for the input. I didn't notice that at first. It is indeed a fast implement.