The header set by Tomcat are always in proper case.
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 26 Nov 2006 11:16:06 +0000 (11:16 +0000)
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 26 Nov 2006 11:16:06 +0000 (11:16 +0000)
Skip creating additional lowercase String when getting AJP response index.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@479344 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ajp/Constants.java

index 21bef8d..99f2e38 100644 (file)
@@ -185,17 +185,17 @@ public final class Constants {
 
     // Translates integer codes to response header names
     public static final String []responseTransArray = {
-            "content-type",
-            "content-language",
-            "content-length",
-            "date",
-            "last-modified",
-            "location",
-            "set-cookie",
-            "set-cookie2",
-            "servlet-engine",
-            "status",
-            "www-authenticate"
+            "Content-Type",
+            "Content-Language",
+            "Content-Length",
+            "Date",
+            "Last-Modified",
+            "Location",
+            "Set-Cookie",
+            "Set-Cookie2",
+            "Servlet-Engine",
+            "Status",
+            "WWW-Authenticate"
     };
 
     private static final Hashtable<String,Integer>  responseTransHash =
@@ -216,7 +216,7 @@ public final class Constants {
 
     public static final int getResponseAjpIndex(String header)
     {
-        Integer i = responseTransHash.get(header.toLowerCase(Locale.US));
+        Integer i = responseTransHash.get(header);
         if (i == null)
             return 0;
         else