Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not support BODY_SIZE_LIMIT #56

Open
deme3 opened this issue Apr 26, 2024 · 2 comments · May be fixed by #57
Open

Does not support BODY_SIZE_LIMIT #56

deme3 opened this issue Apr 26, 2024 · 2 comments · May be fixed by #57

Comments

@deme3
Copy link

deme3 commented Apr 26, 2024

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?

@ivarlovlie
Copy link

ivarlovlie commented Apr 28, 2024

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.

@deme3 deme3 linked a pull request May 4, 2024 that will close this issue
@deme3
Copy link
Author

deme3 commented May 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants