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;
     }
 
 


Reply via email to