FELIX-1863: Applied patch from Justin Edelson

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@881056 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRequest.java b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRequest.java
index 5674587..ab00a18 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRequest.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandlerRequest.java
@@ -53,6 +53,9 @@
     @Override
     public String getServletPath()
     {
+        if ("/".equals(this.alias)) {
+            return "";
+        }
         return this.alias;
     }
 
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/handler/ServletHandlerRequestTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/handler/ServletHandlerRequestTest.java
index 6e7808c..151bf00 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/handler/ServletHandlerRequestTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/handler/ServletHandlerRequestTest.java
@@ -47,4 +47,11 @@
         Assert.assertEquals("/request/to/resource", this.req1.getPathInfo());
         Assert.assertEquals("/request/to/resource", this.req2.getPathInfo());
     }
+    
+    @Test
+    public void testServletPath()
+    {
+        Assert.assertEquals("", this.req1.getServletPath());
+        Assert.assertEquals("/myservlet", this.req2.getServletPath());
+    }
 }