cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r560013 - /incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Thu, 26 Jul 2007 21:55:28 GMT
Author: dkulp
Date: Thu Jul 26 14:55:27 2007
New Revision: 560013

URL: http://svn.apache.org/viewvc?view=rev&rev=560013
Log:
Fix adding Authorization header twice

Modified:
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?view=diff&rev=560013&r1=560012&r2=560013
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Thu Jul 26 14:55:27 2007
@@ -476,7 +476,7 @@
                       getProxy(clientSidePolicy), currentURL);
         connection.setDoOutput(true);  
         
-        //TODO using Message context to deceided HTTP send properties 
+        //TODO using Message context to decided HTTP send properties 
              
         connection.setConnectTimeout((int)clientSidePolicy.getConnectionTimeout());
         connection.setReadTimeout((int)clientSidePolicy.getReceiveTimeout());
@@ -780,13 +780,6 @@
             List<String> headerList = headers.get(header);
             for (String value : headerList) {
                 connection.addRequestProperty(header, value);
-                String v = connection.getRequestProperty(header);
-                if (null == v) {
-                    connection.addRequestProperty(header, value);
-                } else {
-                    LOG.fine("Not adding request property: " + header + ", value: " + value
-                             + ", already set to: " + v);
-                }
             }
         }
     }
@@ -1131,6 +1124,8 @@
         if (policy.isSetAccept()) {
             headers.put("Accept",
                 Arrays.asList(new String[] {policy.getAccept()}));
+        } else {
+            headers.put("Accept", Arrays.asList(new String[] {"*"}));
         }
         if (policy.isSetAcceptEncoding()) {
             headers.put("Accept-Encoding",



Mime
View raw message