You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2006/01/11 21:45:33 UTC

svn commit: r368124 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java

Author: markt
Date: Wed Jan 11 12:45:30 2006
New Revision: 368124

URL: http://svn.apache.org/viewcvs?rev=368124&view=rev
Log:
Further improvements to patch for bug 29214.

Modified:
    tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java

Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java
URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java?rev=368124&r1=368123&r2=368124&view=diff
==============================================================================
--- tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java (original)
+++ tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java Wed Jan 11 12:45:30 2006
@@ -236,12 +236,6 @@
     protected CharChunk redirectURLCC = new CharChunk();
 
     
-    /**
-     * Has the Content-Length header been explicitly set.
-     */
-    protected boolean contentLengthSet = false;
-    
-
     // --------------------------------------------------------- Public Methods
 
 
@@ -265,8 +259,6 @@
         }
 
         writer.recycle();
-
-        contentLengthSet = false;
     }
 
 
@@ -586,7 +578,6 @@
 
         coyoteResponse.reset();
         outputBuffer.reset();
-        contentLengthSet = false;
 
     }
 
@@ -643,8 +634,6 @@
 
         coyoteResponse.setContentLength(length);
 
-        contentLengthSet = true;
-
     }
 
 
@@ -858,13 +847,6 @@
 
         coyoteResponse.addHeader(name, value);
 
-        char cc=name.charAt(0);
-        if(cc=='C' || cc=='c') {
-            if(name.equalsIgnoreCase("Content-Length")) {
-                contentLengthSet = true;
-            }
-        }
-
     }
 
 
@@ -904,7 +886,7 @@
             }
             if(name.equalsIgnoreCase("Content-Length")) {
                 // Can't use null test since this header is an int
-                return contentLengthSet;
+                return (coyoteResponse.getContentLengthLong() != -1);
             }
         }
 
@@ -1129,13 +1111,6 @@
             return;
 
         coyoteResponse.setHeader(name, value);
-
-        char cc=name.charAt(0);
-        if(cc=='C' || cc=='c') {
-            if(name.equalsIgnoreCase("Content-Length")) {
-                contentLengthSet = true;
-            }
-        }
 
     }
 



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