https://bz.apache.org/bugzilla/show_bug.cgi?id=69731
naozumi.taromaru...@nttdata.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #2 from naozumi.taromaru...@nttdata.com --- > Parts parameters also count in the regular parameters count, this is as > expected. I knew that. > So they count in the maxPartCount and also in the maxParameterCount. I knew that. > I don't see how they are double counted. Please see "Possible cause code" at the Description. When there is(are) multipart text parameter(s), 1. parameters.addParameter(name, value); is executed. and 2. limit property of parameters is decremented. (For multipart file parameters, "1" is not performed, so "2" must be performed, but for multipart text parameters, "1" is performed, so "2" must not be performed.) Here are some examples: Fixed conditions: * servlet: see the Description. (execute req.getParameter(name) after req.getParts()) * query param: ?text=aaa (one parameter) * multipart file params count: 0 When multipart text params count: 4 (total parameter count is 5) maxParameterCount="8"(at server.xml) ... result: text=null maxParameterCount="9"(at server.xml) ... result: text=aaa (These are the conditions and results at the Description.) When multipart text params count: 5 (total parameter count is 6) maxParameterCount="10"(at server.xml) ... result: text=null maxParameterCount="11"(at server.xml) ... result: text=aaa When multipart text params count: 6 (total parameter count is 7) maxParameterCount="12"(at server.xml) ... result: text=null maxParameterCount="13"(at server.xml) ... result: text=aaa * Even if "total parameter count" less than(or equal) maxParameterCount, query parameters will not be available. For reference, the behavior when the workaround is implemented is described below. Workaround (Additional condition): Execute req.getParameter(name) before request.getParts(). eg., Add org.apache.catalina.filters.FailedRequestFilter at web.xml. When multipart text params count: 4 (total parameter count is 5) maxParameterCount="4"(at server.xml) ... result: 500 error maxParameterCount="5"(at server.xml) ... result: text=aaa When multipart text params count: 5 (total parameter count is 6) maxParameterCount="5"(at server.xml) ... result: 500 error maxParameterCount="6"(at server.xml) ... result: text=aaa When multipart text params count: 6 (total parameter count is 7) maxParameterCount="6"(at server.xml) ... result: 500 error maxParameterCount="7"(at server.xml) ... result: text=aaa * These are counted correctly. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org