cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r571593 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Date Fri, 31 Aug 2007 21:23:51 GMT
Author: dkulp
Date: Fri Aug 31 14:23:51 2007
New Revision: 571593

URL: http://svn.apache.org/viewvc?rev=571593&view=rev
Log:
[CXF-961] Force Authorization header from tomcat into proper case that we are expecting

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java?rev=571593&r1=571592&r2=571593&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java
Fri Aug 31 14:23:51 2007
@@ -33,6 +33,7 @@
     public static final String CHUNKED = "chunked";
     public static final String CONNECTION = "Connection";
     public static final String CLOSE = "close";
+    public static final String AUTHORIZATION = "Authorization";
 
     
     private static Map<String, String> internalHeaders = new HashMap<String, String>();
@@ -43,6 +44,7 @@
         internalHeaders.put("Content-Transfer-Encoding", "content-transfer-encoding"); 
         internalHeaders.put("Transfer-Encoding", "transfer-encoding");
         internalHeaders.put("Connection", "connection");
+        internalHeaders.put("authorization", "Authorization");
     }
     
     private HttpHeaderHelper() {

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=571593&r1=571592&r2=571593&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Fri Aug 31 14:23:51 2007
@@ -176,12 +176,13 @@
         //TODO how to deal with the fields        
         for (Enumeration e = req.getHeaderNames(); e.hasMoreElements();) {
             String fname = (String)e.nextElement();
+            String mappedName = HttpHeaderHelper.getHeaderKey(fname);
             List<String> values;
-            if (headers.containsKey(fname)) {
-                values = headers.get(fname);
+            if (headers.containsKey(mappedName)) {
+                values = headers.get(mappedName);
             } else {
                 values = new ArrayList<String>();
-                headers.put(HttpHeaderHelper.getHeaderKey(fname), values);
+                headers.put(mappedName, values);
             }
             for (Enumeration e2 = req.getHeaders(fname); e2.hasMoreElements();) {
                 String val = (String)e2.nextElement();



Mime
View raw message