tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1374824 - in /tomcat/trunk: java/org/apache/catalina/connector/Response.java java/org/apache/coyote/Response.java java/org/apache/tomcat/util/http/ResponseUtil.java webapps/docs/changelog.xml
Date Sun, 19 Aug 2012 19:34:50 GMT
Author: markt
Date: Sun Aug 19 19:34:49 2012
New Revision: 1374824

URL: http://svn.apache.org/viewvc?rev=1374824&view=rev
Log:
Remove special handling when setting HTTP content-language header

Removed:
    tomcat/trunk/java/org/apache/tomcat/util/http/ResponseUtil.java
Modified:
    tomcat/trunk/java/org/apache/catalina/connector/Response.java
    tomcat/trunk/java/org/apache/coyote/Response.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1374824&r1=1374823&r2=1374824&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Sun Aug 19 19:34:49 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.connector;
 
-
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringReader;
@@ -51,7 +50,6 @@ import org.apache.tomcat.util.buf.CharCh
 import org.apache.tomcat.util.buf.UEncoder;
 import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.MimeHeaders;
-import org.apache.tomcat.util.http.ResponseUtil;
 import org.apache.tomcat.util.http.ServerCookie;
 import org.apache.tomcat.util.http.parser.AstMediaType;
 import org.apache.tomcat.util.http.parser.HttpParser;
@@ -1023,9 +1021,9 @@ public class Response
 
     /**
      * An extended version of this exists in {@link org.apache.coyote.Response}.
-     * This check is required here to ensure that the usingWriter checks in
-     * {@link #setContentType(String)} and {@link #setLocale(Locale) are applied
-     * since usingWriter is not visible to {@link org.apache.coyote.Response}
+     * This check is required here to ensure that the usingWriter check in
+     * {@link #setContentType(String)} is applied since usingWriter is not
+     * visible to {@link org.apache.coyote.Response}
      *
      * Called from set/addHeader.
      * Return true if the header is special, no need to set the header.
@@ -1035,15 +1033,6 @@ public class Response
             setContentType(value);
             return true;
         }
-        if (name.equalsIgnoreCase("Content-Language")) {
-            Locale locale = ResponseUtil.getLocaleFromLanguageHeader(value);
-            if (locale == null) {
-                return false;
-            } else {
-                setLocale(locale);
-                return true;
-            }
-        }
         return false;
     }
 

Modified: tomcat/trunk/java/org/apache/coyote/Response.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1374824&r1=1374823&r2=1374824&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/Response.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Response.java Sun Aug 19 19:34:49 2012
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.coyote;
 
 import java.io.IOException;
@@ -26,7 +25,6 @@ import javax.servlet.WriteListener;
 import org.apache.coyote.http11.AbstractOutputBuffer;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.http.MimeHeaders;
-import org.apache.tomcat.util.http.ResponseUtil;
 import org.apache.tomcat.util.http.parser.AstMediaType;
 import org.apache.tomcat.util.http.parser.HttpParser;
 import org.apache.tomcat.util.http.parser.ParseException;
@@ -343,15 +341,6 @@ public final class Response {
                 return false;
             }
         }
-        if (name.equalsIgnoreCase("Content-Language")) {
-            Locale locale = ResponseUtil.getLocaleFromLanguageHeader(value);
-            if (locale == null) {
-                return false;
-            } else {
-                setLocale(locale);
-                return true;
-            }
-        }
         return false;
     }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1374824&r1=1374823&r2=1374824&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Aug 19 19:34:49 2012
@@ -92,12 +92,6 @@
         Service. This removes the need to maintain two copies of the mappings
         for Servlets and Filters. (markt)
       </scode>
-      <add>
-        If the <code>Content-Language</code> HTTP header is set directly,
-        attempt to determine the Locale from the header value and call
-        <code>ServletResponse.setLocale()</code> with the derived Locale.
-        (markt)
-      </add>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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


Mime
View raw message