Is there a way to limit the chunk size returned from BodyStream? #1682
-
Hi! Really enjoying using axum, but I've hit a bit of a stumbling block here. I'm implementing code like this:
And really wishing I could have some strong guarantee about the size of A cursory google failed to turn up any likely solutions for me. I'm guessing I could implement this with some middleware, but I'd prefer not to if there's a simpler way (I'm honestly not super familar with the tower). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is more a job for hyper than axum. Perhaps https://docs.rs/hyper/0.14.23/hyper/server/struct.Builder.html#method.http1_max_buf_size is what you want. |
Beta Was this translation helpful? Give feedback.
-
Perfect, thank you! |
Beta Was this translation helpful? Give feedback.
This is more a job for hyper than axum. Perhaps https://docs.rs/hyper/0.14.23/hyper/server/struct.Builder.html#method.http1_max_buf_size is what you want.