You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2011/01/20 09:18:57 UTC
svn commit: r1061153 -
/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
Author: cziegeler
Date: Thu Jan 20 08:18:56 2011
New Revision: 1061153
URL: http://svn.apache.org/viewvc?rev=1061153&view=rev
Log:
FELIX-2793 : Plugin request is not detected as html request if context path contains a dot
Modified:
felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java?rev=1061153&r1=1061152&r2=1061153&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java Thu Jan 20 08:18:56 2011
@@ -184,7 +184,13 @@ public class WebConsolePluginAdapter ext
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;
}