tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteRequest.java
Date Mon, 17 Nov 2003 09:40:17 GMT
remm        2003/11/17 01:40:17

  Modified:    catalina/src/share/org/apache/coyote/tomcat5
                        CoyoteRequest.java
  Log:
  - Reapply my maxPostSize patch, with an added ISE.
  
  Revision  Changes    Path
  1.21      +9 -4      jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- CoyoteRequest.java	16 Nov 2003 21:05:43 -0000	1.20
  +++ CoyoteRequest.java	17 Nov 2003 09:40:17 -0000	1.21
  @@ -2320,6 +2320,11 @@
           int len = getContentLength();
   
           if (len > 0) {
  +            int maxPostSize = ((CoyoteConnector) connector).getMaxPostSize();
  +            if ((maxPostSize > 0) && (len > maxPostSize)) {
  +                log(sm.getString("coyoteRequest.postTooLarge"));
  +                throw new IllegalStateException("Post too large");
  +            }
               try {
                   byte[] formData = null;
                   if (len < CACHED_POST_LEN) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message