-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add max_size parameter to web.Request reading methods #1133
Comments
Should raise 413 on size overloading |
I think you'll never get to request body size check when you run behind nginx in production deployment since nginx has own setting Do we expect users to run aiohttp applications without nginx in production? |
So my point is RAM management is more up to DevOps engineer that is responsible for the server infrastructure, so that he should configure correct limits for nginx, optimal database connection pool size and so on. |
Say attacker could try to overload RAM with huge request body. And we check the max size. Ok. Then he starts to DoS the application, should we now check his request rate? I think both cases are out of application's scope and should be delegated one level upper, namely to servers setup by DevOps team. |
Checking for max length by nxing is satisfactory solution but writing complex configuration with different values for different locations may be painful. |
I think it's useful to have this feature supported by aiohttp as long as:
@f0t0n with the example you say about request rate, there are libraries like djangorestframework that provide this functionality. Is the users choice if they want to use this feature or use something else in the server layer. |
It my prevent malicious clients from sending infinite BODY in post requests which may lead to running out of memory.
Guys, what do you think about?
Does it make sense?
The text was updated successfully, but these errors were encountered: