tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 Tomcat3Response.java
Date Tue, 04 Jun 2002 03:09:57 GMT
billbarker    2002/06/03 20:09:57

  Modified:    coyote/src/java/org/apache/coyote/tomcat3
                        Tomcat3Response.java
  Log:
  Make certain that content-length gets set on the coyoteRequest.
  
  Long-term, I'd much rather use the header only like in the Tomcat 3.3 core Request.  However,
I can't think of a good reason why it can't wait for v1.1.
  
  Reported By: Keith Wannamaker
  
  Revision  Changes    Path
  1.6       +5 -8      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java
  
  Index: Tomcat3Response.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Tomcat3Response.java	17 May 2002 19:49:03 -0000	1.5
  +++ Tomcat3Response.java	4 Jun 2002 03:09:56 -0000	1.6
  @@ -92,14 +92,6 @@
           super();
       }
   
  -    /** Set the Content lenth
  -     */
  -    public void setContentLength(int contentLength) {
  -	if(! isIncluded() ){
  -	    super.setContentLength(contentLength);
  -	    coyoteResponse.setContentLength(contentLength);
  -	}
  -    }
       /** Attach a Coyote Request to this request.
        */
       public void setCoyoteResponse(org.apache.coyote.Response cRes) {
  @@ -126,6 +118,11 @@
       public void endHeaders()  throws IOException {
   	super.endHeaders();
   	coyoteResponse.setStatus(getStatus());
  +	// Check that the content-length has been set.
  +	int cLen = getContentLength();
  +	if( cLen >= 0 ) {
  +	    coyoteResponse.setContentLength(cLen);
  +	}
           // Calls a sendHeaders callback to the protocol
   	coyoteResponse.sendHeaders();
       }
  
  
  

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


Mime
View raw message