diff options
author | slewis | 2015-07-25 03:55:01 +0000 |
---|---|---|
committer | slewis | 2015-07-25 03:55:01 +0000 |
commit | 51290c543d7b4916d952f1d500a03b5031ad9910 (patch) | |
tree | 287bcfe346102de37ac6f843459359b4e8a3f2a1 /providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4 | |
parent | a5729494c36d24e7921506ce4572e48aa8d20714 (diff) | |
download | org.eclipse.ecf-51290c543d7b4916d952f1d500a03b5031ad9910.tar.gz org.eclipse.ecf-51290c543d7b4916d952f1d500a03b5031ad9910.tar.xz org.eclipse.ecf-51290c543d7b4916d952f1d500a03b5031ad9910.zip |
Applied patch 255421 from bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=444377. Passes all ECF
filetransfer tests run locally.
Change-Id: I6cfa763438da6d7a7d704be4660b578ee37b9f65
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4')
3 files changed, 10 insertions, 5 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/META-INF/MANIFEST.MF index 6f0dac7f9..1b5a2a642 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/META-INF/MANIFEST.MF +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin.name Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer.httpclient4;singleton:=true -Bundle-Version: 1.0.1043.qualifier +Bundle-Version: 1.0.2000.qualifier Bundle-Localization: plugin Bundle-Activator: org.eclipse.ecf.internal.provider.filetransfer.httpclient4.Activator Require-Bundle: org.eclipse.equinox.common, diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient4/ECFHttpClientProtocolSocketFactory.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient4/ECFHttpClientProtocolSocketFactory.java index 7f5d94daf..268af4e14 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient4/ECFHttpClientProtocolSocketFactory.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient4/ECFHttpClientProtocolSocketFactory.java @@ -77,9 +77,11 @@ public class ECFHttpClientProtocolSocketFactory implements SchemeSocketFactory { Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, ECFHttpClientProtocolSocketFactory.class, "connectSocket " + remoteAddress.toString() + " timeout=" + timeout); //$NON-NLS-1$ //$NON-NLS-2$ try { - // Use String.valueOf to protect against null - Trace.trace(Activator.PLUGIN_ID, "bind(" + String.valueOf(localAddress) + ")"); //$NON-NLS-1$//$NON-NLS-2$ - sock.bind(localAddress); + if (localAddress != null) { + // only explicitly bind if a local address is actually provided (bug 444377) + Trace.trace(Activator.PLUGIN_ID, "bind(" + localAddress + ")"); //$NON-NLS-1$//$NON-NLS-2$ + sock.bind(localAddress); + } Trace.trace(Activator.PLUGIN_ID, "connect(" + remoteAddress.toString() + ", " + timeout + ")"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ sock.connect(remoteAddress, timeout); Trace.trace(Activator.PLUGIN_ID, "connected"); //$NON-NLS-1$ diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient4/ECFHttpClientSecureProtocolSocketFactory.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient4/ECFHttpClientSecureProtocolSocketFactory.java index 14ec7fd2b..7a8658155 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient4/ECFHttpClientSecureProtocolSocketFactory.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient4/ECFHttpClientSecureProtocolSocketFactory.java @@ -85,7 +85,10 @@ public final class ECFHttpClientSecureProtocolSocketFactory implements LayeredSc private void performConnection(final Socket socket, final InetSocketAddress remoteAddress, final InetSocketAddress localAddress, final HttpParams params) throws SocketException, IOException { try { socket.setReuseAddress(HttpConnectionParams.getSoReuseaddr(params)); - socket.bind(localAddress); + if (localAddress != null) { + // only explicitly bind if a local address is actually provided (bug 444377) + socket.bind(localAddress); + } int connectionTimeout = HttpConnectionParams.getConnectionTimeout(params); int socketTimeout = HttpConnectionParams.getSoTimeout(params); |