honojs / website

Repository for hono.dev
https://hono.dev
68 stars 209 forks source link

add warning about Bun's default request body limit #351

Closed BobbyRaduloff closed 1 month ago

BobbyRaduloff commented 1 month ago

In reference to honojs/hono#2671,

Bun terminates requests above 128MiB by default. Setting the Hono bodyLimit middleware to a higher value will not help as the request is terminated before it even reaches Hono. Additionally, Bun does not provide an explicit error about this and the onError handler on Hono's bodyLimit middleware doesn't get called either, making errors hard to debug.

A section is added to warn users about this behavior with mitigation steps.

yusukebe commented 1 month ago

Hey @BobbyRaduloff

Good!! Perfect. I'll merge this now.