tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteConnector.java CoyoteRequest.java LocalStrings.properties
Date Sun, 16 Nov 2003 21:37:43 GMT

----- Original Message ----- 
From: "Remy Maucherat" <remm@apache.org>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Sunday, November 16, 2003 2:34 AM
Subject: Re: cvs commit:
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5
CoyoteConnector.java CoyoteRequest.java LocalStrings.properties


> Bill Barker wrote:
> > I'm -1 on this.  It gives the Servlet no indication that anything is
wrong,
> > and leaves junk in the input stream for the next keep-alive request.  I
> > think that it would be better to handle this in the Adaptor's
> > postParseRequest method.
>
> I disagree: the problem with this is that we allocate one array right
> away based on content-length, not that there's a big upload (which is
fine).
>

The Adaptor can check for this:
  if("POST".equalsIgnoreCase(request.getMethod()) &&
     "application/x-www-form-urlencoded".equals(contentType) &&
     request.getContentLength() > connector.getMaxPostSize()) {
          response.setStatus(413);
          response.setMessage("POST Body exceeds maximum");
          return false;
   }


> Obviously, keep-alive is not an option in that case (and Tomcat will
> attempt to swallow any remaining output).
>
> Remy
>
>
>
> ---------------------------------------------------------------------
> 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