diff options
author | Simon Kaegi | 2007-02-13 22:57:49 +0000 |
---|---|---|
committer | Simon Kaegi | 2007-02-13 22:57:49 +0000 |
commit | 46a642ca07b24ac21353434e9d5794153b523aeb (patch) | |
tree | de85994f86045cdacba2f4275ceddf663526ec57 /bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox | |
parent | 3e819321e5d59f43fd43a7ed130d66255b181c31 (diff) | |
download | rt.equinox.bundles-46a642ca07b24ac21353434e9d5794153b523aeb.tar.gz rt.equinox.bundles-46a642ca07b24ac21353434e9d5794153b523aeb.tar.xz rt.equinox.bundles-46a642ca07b24ac21353434e9d5794153b523aeb.zip |
[server] BundleEntryHttpContext should validate bundle entry paths are "/" prefixed
Diffstat (limited to 'bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox')
-rw-r--r-- | bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java index 102de3058..01c7fed24 100644 --- a/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java +++ b/bundles/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpContextManager.java @@ -171,10 +171,14 @@ public class HttpContextManager implements Listener { Set result = new HashSet(); while (entryPaths.hasMoreElements()) { + String entryPath = (String) entryPaths.nextElement(); + if (entryPath.charAt(0) != '/') + entryPath = "/" + entryPath; //$NON-NLS-1$ + if (bundlePath == null) - result.add(entryPaths.nextElement()); + result.add(entryPath); else - result.add(((String)entryPaths.nextElement()).substring(bundlePath.length())); + result.add(entryPath.substring(bundlePath.length())); } return result; } |