You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2013/03/06 22:11:52 UTC
svn commit: r1453562 -
/cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
Author: dkulp
Date: Wed Mar 6 21:11:52 2013
New Revision: 1453562
URL: http://svn.apache.org/r1453562
Log:
Merged revisions 1453541 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1453541 | dkulp | 2013-03-06 15:42:52 -0500 (Wed, 06 Mar 2013) | 2 lines
[CXF-4879] Check for empty strings for the Proxy properties.
........
Modified:
cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
Modified: cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java?rev=1453562&r1=1453561&r2=1453562&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java (original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java Wed Mar 6 21:11:52 2013
@@ -63,6 +63,9 @@ public class ProxyFactory {
// Retrieve system properties (if any)
HTTPClientPolicy systemProxyConfiguration = null;
String proxyHost = SystemPropertyAction.getPropertyOrNull(HTTP_PROXY_HOST);
+ if (StringUtils.isEmpty(proxyHost)) {
+ proxyHost = null;
+ }
if (proxyHost != null) {
// System is configured with a proxy, use it
@@ -72,6 +75,10 @@ public class ProxyFactory {
// 8080 is the default proxy port value as per some documentation
String proxyPort = SystemPropertyAction.getProperty(HTTP_PROXY_PORT, "8080");
+ if (StringUtils.isEmpty(proxyPort)) {
+ proxyPort = null;
+ }
+
systemProxyConfiguration.setProxyServerPort(Integer.valueOf(proxyPort));
// Load non proxy hosts