commit | 566efaf1a9b3f991e77382986a4d4eb6b9e40d61 | [log] [tgz] |
---|---|---|
author | Carsten Ziegeler <cziegeler@apache.org> | Thu Jan 20 08:18:56 2011 +0000 |
committer | Carsten Ziegeler <cziegeler@apache.org> | Thu Jan 20 08:18:56 2011 +0000 |
tree | e5e922f639b9ad1de4ca1e69fa3b295a77ae7267 | |
parent | c8d7093a65de48b13fa8c5ff1594d33e8be5fac4 [diff] |
FELIX-2793 : Plugin request is not detected as html request if context path contains a dot git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1061153 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java index c61c5bf..2d1c57c 100644 --- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java +++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
@@ -184,7 +184,13 @@ protected boolean isHtmlRequest( final HttpServletRequest request ) { final String requestUri = request.getRequestURI(); - return requestUri.endsWith( ".html" ) || requestUri.lastIndexOf( '.' ) < 0; + if ( requestUri.endsWith( ".html" ) ) { + return true; + } + // check if there is an extension + final int lastSlash = requestUri.lastIndexOf('/'); + final int lastDot = requestUri.indexOf('.', lastSlash + 1); + return lastDot < 0; }