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

request entity too large error #31

Closed
sheerun opened this issue Mar 27, 2019 · 3 comments
Closed

request entity too large error #31

sheerun opened this issue Mar 27, 2019 · 3 comments

Comments

@sheerun
Copy link
Contributor

sheerun commented Mar 27, 2019

I'm sending 4.6MB POST request which should be fine size for cloudflare workers, but it results with following error when testing locally:

[0] PayloadTooLargeError: request entity too large
[0]     at readStream (/Users/sheerun/Source/.../api/node_modules/raw-body/index.js:155:17)
[0]     at getRawBody (/Users/sheerun/Source/.../api/node_modules/raw-body/index.js:108:12)
[0]     at read (/Users/sheerun/Source/.../api/node_modules/body-parser/lib/read.js:77:3)
[0]     at rawParser (/Users/sheerun/Source/.../api/node_modules/body-parser/lib/types/raw.js:81:5)
[0]     at Layer.handle [as handle_request] (/Users/sheerun/Source/.../api/node_modules/express/lib/router/layer.js:95:5)
[0]     at trim_prefix (/Users/sheerun/Source/.../api/node_modules/express/lib/router/index.js:317:13)
[0]     at /Users/sheerun/Source/.../api/node_modules/express/lib/router/index.js:284:7
[0]     at Function.process_params (/Users/sheerun/Source/.../api/node_modules/express/lib/router/index.js:335:12)
[0]     at next (/Users/sheerun/Source/.../api/node_modules/express/lib/router/index.js:275:10)
[0]     at expressInit (/Users/sheerun/Source/.../api/node_modules/express/lib/middleware/init.js:40:5)

Could you set better limits for body parser?

@sheerun
Copy link
Contributor Author

sheerun commented Mar 27, 2019

I think default limit of bodyParser is 100kb which is way too low

@gja
Copy link
Owner

gja commented Mar 27, 2019

Hi. Thanks for the issue. Would you mind sending this as a pr as well? Else I’ll look at this over the weekend. I’d say removing the limit would probably be the least surprising.

sheerun added a commit to sheerun/cloudflare-worker-local that referenced this issue Mar 27, 2019
@sheerun
Copy link
Contributor Author

sheerun commented Mar 27, 2019

Sure I've sent PR

@gja gja closed this as completed in 000c435 Mar 29, 2019
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

No branches or pull requests

2 participants