tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1356184 - in /tomcat/tc6.0.x/trunk: ./ STATUS.txt java/javax/servlet/http/HttpServlet.java webapps/docs/changelog.xml
Date Mon, 02 Jul 2012 11:16:25 GMT
Author: markt
Date: Mon Jul  2 11:16:23 2012
New Revision: 1356184

URL: http://svn.apache.org/viewvc?rev=1356184&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53454
Return correct content-length header for HEAD requests when content length is greater than
2GB.

Modified:
    tomcat/tc6.0.x/trunk/   (props changed)
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServlet.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc6.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1354847,1354856
  Merged /tomcat/tc7.0.x/trunk:r1354866

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1356184&r1=1356183&r2=1356184&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jul  2 11:16:23 2012
@@ -189,12 +189,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko, markt, kfujino
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53454
-  Return correct content-length header for HEAD requests when value is > 2GB
-  http://svn.apache.org/viewvc?rev=1354866&view=rev
-  +1: markt, kkolinko, kfujino
-  -1:
-
 
 PATCHES/ISSUES THAT ARE STALLED
 

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServlet.java?rev=1356184&r1=1356183&r2=1356184&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServlet.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServlet.java Mon Jul  2 11:16:23 2012
@@ -751,6 +751,36 @@ class NoBodyResponse extends HttpServlet
         didSetContentLength = true;
     }
 
+    public void setHeader(String name, String value) {
+        super.setHeader(name, value);
+        checkHeader(name);
+    }
+
+    @Override
+    public void addHeader(String name, String value) {
+        super.addHeader(name, value);
+        checkHeader(name);
+    }
+
+    @Override
+    public void setIntHeader(String name, int value) {
+        super.setIntHeader(name, value);
+        checkHeader(name);
+    }
+
+    @Override
+    public void addIntHeader(String name, int value) {
+        super.addIntHeader(name, value);
+        checkHeader(name);
+    }
+
+    private void checkHeader(String name) {
+        if ("content-length".equalsIgnoreCase(name)) {
+            didSetContentLength = true;
+        }
+    }
+
+    @Override
     public ServletOutputStream getOutputStream() throws IOException {
         return noBody;
     }

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1356184&r1=1356183&r2=1356184&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jul  2 11:16:23 2012
@@ -319,6 +319,10 @@
         (<code>res/maven/mvn-pub.xml</code>) with the Tomcat 7 version,
         making full use of Nexus. (markt)
       </update>
+      <fix>
+        <bug>53454</bug>: Return correct content-length header for HEAD requests
+        when content length is greater than 2GB. (markt)
+      </fix>
     </changelog>
   </subsection>
 </section>



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


Mime
View raw message