随后设置Tomcat中POST方式提交数据大小:
maxPostSize="0"
修改后提交数据依然会出错,但给出了错误提示:
信息: More than the maximum number of request parameters (GET plus POST) for a single request ([10,000]) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
Note: further occurrences of this error will be logged at DEBUG level.
按照错误提示在在Connector 节点中加入maxParameterCount="-1",再进行测试便成功了。
<Connector executor="tomcatThreadPool"
port="9080"
protocol="HTTP/1.1"
maxParameterCount="-1"
connectionTimeout="20000"
acceptCount="75"
disableUploadTimeout="true"
enableLookups="false"
URIEncoding="UTF-8" />
maxParameterCount:
The maximum number of parameters (GET plus POST) which will be automatically parsed by the container. 10000 by default. A value of less than 0 means no limit.
查询网上资料了解到引起该问题是
由于Java中的哈希表实现上的漏洞,现如今因为Tomcat使用了哈希表来存储HTTP请求参数,因此也受此问题影响。