cxf-commits mailing list archives

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

URL: http://svn.apache.org/r1458654
Log:
Merged revisions 1458653 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1458653 | ningjiang | 2013-03-20 14:36:51 +0800 (Wed, 20 Mar 2013) | 9 lines
  
  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.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java

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

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

Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java?rev=1458654&r1=1458653&r2=1458654&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
Wed Mar 20 06:49:09 2013
@@ -311,7 +311,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