cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1462184 - /cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
Date Thu, 28 Mar 2013 16:09:33 GMT
Author: dkulp
Date: Thu Mar 28 16:09:32 2013
New Revision: 1462184

URL: http://svn.apache.org/r1462184
Log:
Merged revisions 1458654 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1458654 | ningjiang | 2013-03-20 02:49:09 -0400 (Wed, 20 Mar 2013) | 16 lines

  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.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java

Modified: cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java?rev=1462184&r1=1462183&r2=1462184&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
Thu Mar 28 16:09:32 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