cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1458653 - in /cxf/branches/2.7.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
Date Wed, 20 Mar 2013 06:36:51 GMT
Author: ningjiang
Date: Wed Mar 20 06:36:51 2013
New Revision: 1458653

URL: http://svn.apache.org/r1458653
Log:
Merged revisions 1458649 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1458649 | ningjiang | 2013-03-20 14:25:04 +0800 (Wed, 20 Mar 2013) | 1 line
  
  CXF-4906 fix the adding to User-Agent header issue
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1458649

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java?rev=1458653&r1=1458652&r2=1458653&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
Wed Mar 20 06:36:51 2013
@@ -320,7 +320,8 @@ public class Headers {
                 connection.setRequestProperty(header, b.toString());
             }
         }
-        if (!connection.getRequestProperties().containsKey("User-Agent")) {
+        // make sure we don't add more than one User-Agent header
+        if (connection.getRequestProperty("User-Agent") != null) {
             connection.addRequestProperty("User-Agent", Version.getCompleteVersionString());
         }
     }



Mime
View raw message