http参数MAX_COUNT wildfly的默认值是多少?
What is default value for http parameters MAX_COUNT wildfly?
我们已经将 jboss 升级到 wildfly ,在旧版本中我们遇到了这样的问题 Maximum number of parameter passed in a post。
在 jboss 的旧版本中,我们收到了这条错误消息
2015-02-10 20:04:34,582 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sf].[action]] (http--
127.0.0.1-8080-38) Servlet.service() for servlet action threw exception: java.lang.IllegalStateException: More than the
maximum number of request parameters (GET plus POST) for a single request ([5,000]) were detected. Any parameters beyond
this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
at org.apache.tomcat.util.http.Parameters.addParameter(Parameters.java:199) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:382) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:229) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.parseParameters(Request.java:2874) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.getParameterNames(Request.java:1333) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.RequestFacade.getParameterNames(RequestFacade.java:379) [jbossweb-7.0.13.Final.jar:]
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1225) [struts.jar:1.1]
现在为了验证这个问题,我们想知道 http 参数的默认值是多少 MAX_COUNT。
在谷歌搜索中我发现这个讨论没有提供太多信息,关于它是如何修复的
http://lists.jboss.org/pipermail/undertow-dev/2013-April/000287.html
max parameter count默认值为“1000”,如需修改
在 wildfly 中,我们必须在 http-listener 中使用 "max-parameters" 属性。
<http-listener name="default" socket-binding="http" max-parameters="10000"/>
文档请参考here
在 7.x 版本中,您可以通过以下更改修复
org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000
对于旧版本 jboss 讨论的最大参数数 here
我们已经将 jboss 升级到 wildfly ,在旧版本中我们遇到了这样的问题 Maximum number of parameter passed in a post。
在 jboss 的旧版本中,我们收到了这条错误消息
2015-02-10 20:04:34,582 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sf].[action]] (http--
127.0.0.1-8080-38) Servlet.service() for servlet action threw exception: java.lang.IllegalStateException: More than the
maximum number of request parameters (GET plus POST) for a single request ([5,000]) were detected. Any parameters beyond
this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
at org.apache.tomcat.util.http.Parameters.addParameter(Parameters.java:199) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:382) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:229) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.parseParameters(Request.java:2874) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.getParameterNames(Request.java:1333) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.RequestFacade.getParameterNames(RequestFacade.java:379) [jbossweb-7.0.13.Final.jar:]
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1225) [struts.jar:1.1]
现在为了验证这个问题,我们想知道 http 参数的默认值是多少 MAX_COUNT。
在谷歌搜索中我发现这个讨论没有提供太多信息,关于它是如何修复的 http://lists.jboss.org/pipermail/undertow-dev/2013-April/000287.html
max parameter count默认值为“1000”,如需修改
在 wildfly 中,我们必须在 http-listener 中使用 "max-parameters" 属性。
<http-listener name="default" socket-binding="http" max-parameters="10000"/>
文档请参考here
在 7.x 版本中,您可以通过以下更改修复
org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000
对于旧版本 jboss 讨论的最大参数数 here