geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krishnakumar B (JIRA)" <...@geronimo.apache.org>
Subject [jira] Created: (GERONIMO-2343) tomcat does not use maxPostSize set in config.xml
Date Tue, 22 Aug 2006 13:44:13 GMT
tomcat does not use maxPostSize set in config.xml
-------------------------------------------------

                 Key: GERONIMO-2343
                 URL: http://issues.apache.org/jira/browse/GERONIMO-2343
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: Tomcat
    Affects Versions: 1.1.2, 1.1.x
            Reporter: Krishnakumar B
         Attachments: tomcat-maxPostSize.patch

I set a value for maxPostSize in config.xml

    <gbean name="TomcatWebConnector">
      <attribute name="host">0.0.0.0</attribute>
      <attribute name="port">8080</attribute>
      <attribute name="redirectPort">8443</attribute>
      <attribute name="bufferSizeBytes">2048</attribute>
      <attribute name="maxThreads">150</attribute>
      <attribute name="acceptQueueSize">100</attribute>
      <attribute name="lingerMillis">-1</attribute>
      <attribute name="tcpNoDelay">true</attribute>
      <attribute name="minSpareThreads">25</attribute>
      <attribute name="maxSpareThreads">75</attribute>
      <attribute name="maxHttpHeaderSizeBytes">8192</attribute>
      <attribute name="hostLookupEnabled">false</attribute>
      <attribute name="connectionTimeoutMillis">20000</attribute>
      <attribute name="uploadTimeoutEnabled">false</attribute>
      <attribute name="maxPostSize">20</attribute>
      <attribute name="maxSavePostSize">4096</attribute>
      <attribute name="emptySessionPath">false</attribute>
    </gbean>

Tomcat Connector uses the value set in Connector to check for POST size.

        if (len > 0) {
            int maxPostSize = connector.getMaxPostSize();
            if ((maxPostSize > 0) && (len > maxPostSize)) {
                context.getLogger().info
                    (sm.getString("coyoteRequest.postTooLarge"));
                throw new IllegalStateException("Post too large");
            }

While in Connector GBean setAttribute does not set in Connector
connector.setAttribute("maxPostSize", new Integer(bytes));
This is set in hashtable in HTTP11Protocol Handler. As a result the default value is maintained
in connector ( 2097152 )

This fix uses setter method in connector to set this value. ( connector.setMaxPostSize(bytes)
)



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message