svelte-adapter-bun icon indicating copy to clipboard operation
svelte-adapter-bun copied to clipboard

Does not support BODY_SIZE_LIMIT

Open deme3 opened this issue 1 year ago • 2 comments

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?

deme3 avatar Apr 26 '24 15:04 deme3

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.

ivarlovlie avatar Apr 28 '24 19:04 ivarlovlie

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.

deme3 avatar May 04 '24 20:05 deme3