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

Option to specify a size limit to the request body #14

Open
rousan opened this issue May 10, 2020 · 3 comments
Open

Option to specify a size limit to the request body #14

rousan opened this issue May 10, 2020 · 3 comments

Comments

@rousan
Copy link
Member

rousan commented May 10, 2020

No description provided.

@UndefinedBHVR
Copy link
Contributor

I believe we should probably have a discussion regarding the implementation of this.
IE: Should it be per request, or should there be a global limit, what should the default value be (in bytes), etc...

@gsserge
Copy link
Member

gsserge commented Feb 23, 2021

I think this can be implemented in a pre middleware similar to how warp does it https://github.com/seanmonstar/warp/blob/master/src/filters/body.rs#L51
Hyper will not read more than content-length bytes of the body.

@UndefinedBHVR
Copy link
Contributor

I think this can be implemented in a pre middleware similar to how warp does it https://github.com/seanmonstar/warp/blob/master/src/filters/body.rs#L51
Hyper will not read more than content-length bytes of the body.

I believe that would be a great way to do it. Basically just adding a max_size(size) function to the builder pretty much, correct?

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

3 participants