Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-04-01 15:32:52 +0000
committerslewis2009-04-01 15:32:52 +0000
commitb718fdcd174776d415a44b4e0bbce9b0561f7df8 (patch)
tree5a2d38b720acc8b83df70f98369607e2416a3570 /providers
parent19f88c9f3ef7a0e4fa655010ee0724c9d473b9b1 (diff)
downloadorg.eclipse.ecf-b718fdcd174776d415a44b4e0bbce9b0561f7df8.tar.gz
org.eclipse.ecf-b718fdcd174776d415a44b4e0bbce9b0561f7df8.tar.xz
org.eclipse.ecf-b718fdcd174776d415a44b4e0bbce9b0561f7df8.zip
Applied patch for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=270749
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java
index 8c018b217..5ac544f3f 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java
@@ -167,11 +167,18 @@ public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer
return hostConfiguration;
}
- // drops the scheme including the colon (e.g http://server/a/b.html -> //server/a/b.html
+ // drops the scheme and port including the colon (e.g http://server:8080/a/b.html -> //server/a/b.html
private static String getTargetRelativePathFromURL(String url) {
final int colonSlashSlash = url.indexOf("://"); //$NON-NLS-1$
if (colonSlashSlash < 0)
return "/"; //$NON-NLS-1$
+ final int colon = url.indexOf(':', colonSlashSlash + 4);
+ if (colon >= 0) {
+ final int nextSlash = url.indexOf('/', colonSlashSlash + 4);
+ if (nextSlash > colon)
+ return url.substring(colonSlashSlash + 1, colon) + url.substring(nextSlash);
+ }
+
return url.substring(colonSlashSlash + 1);
}

Back to the top