Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Reckord2019-05-30 13:16:03 -0400
committerCarsten Reckord2019-05-30 14:07:09 -0400
commit1bf9c73f825974e160bc5bc3964e413b3967f8c8 (patch)
tree4a68338a243d5b839374cab51c66f139d2fff51c
parentaffc575022211770bd04a4937e2fd86a885295af (diff)
downloadorg.eclipse.ecf-1bf9c73f825974e160bc5bc3964e413b3967f8c8.tar.gz
org.eclipse.ecf-1bf9c73f825974e160bc5bc3964e413b3967f8c8.tar.xz
org.eclipse.ecf-1bf9c73f825974e160bc5bc3964e413b3967f8c8.zip
Bug 544447 - [provider] Implement filetransfer provider using HttpClient 4.5 API
Keep HttpResponse after closing the transfer, since it might still be accessed afterwards. Change-Id: I31321dd1ba416d097a4619949e446214be859ecf Signed-off-by: Carsten Reckord <reckord@yatta.de>
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient45/src/org/eclipse/ecf/provider/filetransfer/httpclient45/HttpClientRetrieveFileTransfer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient45/src/org/eclipse/ecf/provider/filetransfer/httpclient45/HttpClientRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient45/src/org/eclipse/ecf/provider/filetransfer/httpclient45/HttpClientRetrieveFileTransfer.java
index f0f148326..672897916 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient45/src/org/eclipse/ecf/provider/filetransfer/httpclient45/HttpClientRetrieveFileTransfer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient45/src/org/eclipse/ecf/provider/filetransfer/httpclient45/HttpClientRetrieveFileTransfer.java
@@ -198,7 +198,6 @@ public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer
} catch (final IOException e) {
Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
}
- httpResponse = null;
}
// Close output stream...if we're supposed to
@@ -365,7 +364,9 @@ public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer
return responseCode;
}
httpVersion = version.getMinor();
- responseCode = httpResponse.getStatusLine().getStatusCode();
+ if (httpResponse != null) {
+ responseCode = httpResponse.getStatusLine().getStatusCode();
+ }
return responseCode;
}

Back to the top