Author: markt
Date: Tue Jun  5 20:56:27 2012
New Revision: 1346581

URL: http://svn.apache.org/viewvc?rev=1346581&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53356
Additional fix. Correct context & servlet paths

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
    
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=1346581&r1=1346580&r2=1346581&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java Tue Jun  5 
20:56:27 2012
@@ -1036,9 +1036,9 @@ public final class Mapper {
             if (path.equals("/")) {
                 // Special handling for Context Root mapped servlet
                 mappingData.pathInfo.setString("/");
-                mappingData.wrapperPath.recycle();
+                mappingData.wrapperPath.setString("");
                 // This seems wrong but it is what the spec says...
-                mappingData.contextPath.recycle();
+                mappingData.contextPath.setString("");
             } else {
                 mappingData.wrapperPath.setString(wrappers[pos].name);
             }

Modified: 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java?rev=1346581&r1=1346580&r2=1346581&view=diff
==============================================================================
--- 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java 
(original)
+++ 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java 
Tue Jun  5 20:56:27 2012
@@ -62,10 +62,10 @@ public class TestMapperContextRoot exten
             // Confirm behaviour as per Servler 12.2
             boolean pass = "/".equals(req.getPathInfo());
             if (pass) {
-                pass = (req.getServletPath() == null);
+                pass = "".equals(req.getServletPath());
             }
             if (pass) {
-                pass = (req.getContextPath() == null);
+                pass = "".equals(req.getContextPath());
             }
 
             resp.setContentType("text/plain");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to