Closed rafaello7 closed 2 days ago
Thanks for the suggestion, @rafaello7.
It looks like the proposed property would map onto org.apache.catalina.connector.Connector#setMaxParameterCount(int)
. There's also org.eclipse.jetty.ee10.servlet.ServletContextHandler#setMaxFormKeys(int)
for Jetty that looks like it serves a very similar purpose. We may want to add a property for that as well.
@violetagg is there a similar setting in Reactor Netty?
@wilkinsona Reactor Netty does not parse the request line (query string), this is done by Spring Framework's parser. Also I can see that this configuration maxParameterCount is also relevant to multipart. Reactor Netty multipart implementation is not used by Spring Framework as it uses its own.
maxParameterCount - The maximum total number of request parameters (including uploaded files) obtained from the query
string and, for POST requests, the request body if the content type is application/x-www-form-
urlencoded or multipart/form-data. Requests that exceed this limit will be rejected. A value of less than 0 means no limit. If
not specified, a default of 1000 is used.
Thanks, Violeta. So we'd keep this as a web server-specific setting. I've opened #43280 for the Jetty side of things.
With thanks to @quaff for the reminder, https://github.com/spring-projects/spring-boot/pull/42448 already took care of the adding the equivalent property for Jetty.
Closing in favor of #43286.
Tomcat has a limit of HTML form parameter count, which is 10000 by default. Currently the limit change is possible in Spring Boot only programmatically. On the other hand, the Undertow embedded server has a property server.undertow.max-parameters. Could it be possible to have such property for Tomcat also?