tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Seguin" <seg...@motive.com>
Subject [coyote/tomcat 3.3.1] content-length header never set?
Date Thu, 02 May 2002 03:20:43 GMT
i was playing around with coyote (v1.0-b8) and tomcat 3.3.1 and i noticed that setting a content-length
header had absolutely no effect.  in other words, if i set a content-length header in a servlet,
the http client would never see this header.  i dug around through the code a little and discovered
that the following patch fixed this.  now, i really don't know anything about the tomcat 3
internals, or coyote, so, i really don't know how "right" this is :)

Index: Tomcat3Response.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java,v
retrieving revision 1.3
diff -u -w -r1.3 Tomcat3Response.java
--- Tomcat3Response.java	9 Apr 2002 18:37:24 -0000	1.3
+++ Tomcat3Response.java	2 May 2002 03:15:07 -0000
@@ -91,6 +91,11 @@
         super();
     }
 
+    public void setContentLength(int contentLength) {
+        super.setContentLength(contentLength);
+        coyoteResponse.setContentLength(contentLength);
+    }
+
     /** Attach a Coyote Request to this request.
      */
     public void setCoyoteResponse(org.apache.coyote.Response cRes) {

--
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