Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2015-08-28 16:19:14 +0000
committerThomas Watson2015-08-28 16:31:50 +0000
commitd56bdf10278de5bf2c36745ccac842190eeb72c6 (patch)
tree3a7c821771337fb50d2ad33ba1c387c48f237261 /bundles/org.eclipse.equinox.http.servlet
parent13eeb0a927112cb4ce73258f8a460f5f9199a703 (diff)
downloadrt.equinox.bundles-d56bdf10278de5bf2c36745ccac842190eeb72c6.tar.gz
rt.equinox.bundles-d56bdf10278de5bf2c36745ccac842190eeb72c6.tar.xz
rt.equinox.bundles-d56bdf10278de5bf2c36745ccac842190eeb72c6.zip
Bug 476136 - [http whiteboard] using legacy servlet registration does
not allow exact matching to take precidence
Diffstat (limited to 'bundles/org.eclipse.equinox.http.servlet')
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java
index d363b698..9e28f58f 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java
@@ -692,13 +692,13 @@ public class HttpServiceRuntimeImpl
// check the pattern against the original input
ContextController.checkPattern(alias);
- String pattern = alias;
- // need to make sure exact matching aliases are converted to wildcard pattern matches
- if (!pattern.endsWith(Const.SLASH_STAR) && !pattern.startsWith(Const.STAR_DOT) && !pattern.contains(Const.SLASH_STAR_DOT)) {
- if (pattern.endsWith(Const.SLASH)) {
- pattern = pattern + '*';
+ Object pattern = alias;
+ // need to make sure exact matching aliases are converted to exact matching + wildcard pattern matching
+ if (!alias.endsWith(Const.SLASH_STAR) && !alias.startsWith(Const.STAR_DOT) && !alias.contains(Const.SLASH_STAR_DOT)) {
+ if (alias.endsWith(Const.SLASH)) {
+ pattern = new String[] {alias, alias + '*'};
} else {
- pattern = pattern + Const.SLASH_STAR;
+ pattern = new String[] {alias, alias + Const.SLASH_STAR};
}
}

Back to the top