tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1354856 - /tomcat/trunk/java/javax/servlet/http/HttpServlet.java
Date Thu, 28 Jun 2012 08:26:51 GMT
Author: markt
Date: Thu Jun 28 08:26:50 2012
New Revision: 1354856

URL: http://svn.apache.org/viewvc?rev=1354856&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53454
Additional ways content length may be set

Modified:
    tomcat/trunk/java/javax/servlet/http/HttpServlet.java

Modified: tomcat/trunk/java/javax/servlet/http/HttpServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServlet.java?rev=1354856&r1=1354855&r2=1354856&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/http/HttpServlet.java (original)
+++ tomcat/trunk/java/javax/servlet/http/HttpServlet.java Thu Jun 28 08:26:50 2012
@@ -766,6 +766,28 @@ class NoBodyResponse extends HttpServlet
     @Override
     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;
         }



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


Mime
View raw message