Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-04-01 15:44:09 +0000
committerslewis2009-04-01 15:44:09 +0000
commit090069c8c4eee07bd4e76ac37408c712947704d8 (patch)
treefe8c0a83cb3a47e47679f735651d8959fdfa1813 /providers
parentb718fdcd174776d415a44b4e0bbce9b0561f7df8 (diff)
downloadorg.eclipse.ecf-090069c8c4eee07bd4e76ac37408c712947704d8.tar.gz
org.eclipse.ecf-090069c8c4eee07bd4e76ac37408c712947704d8.tar.xz
org.eclipse.ecf-090069c8c4eee07bd4e76ac37408c712947704d8.zip
Added test for colon after query to properly address 270249
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java5
1 files changed, 4 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 5ac544f3f..db0989399 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
@@ -173,7 +173,10 @@ public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer
if (colonSlashSlash < 0)
return "/"; //$NON-NLS-1$
final int colon = url.indexOf(':', colonSlashSlash + 4);
- if (colon >= 0) {
+ // Get query start location, so that colon is not found from query
+ final int question = url.indexOf('?', colonSlashSlash + 4);
+ // Only consider colon that is before query
+ if (colon >= 0 && ((question < 0) || (colon < question))) {
final int nextSlash = url.indexOf('/', colonSlashSlash + 4);
if (nextSlash > colon)
return url.substring(colonSlashSlash + 1, colon) + url.substring(nextSlash);

Back to the top