Author: markt
Date: Tue Jun 5 20:57:16 2012
New Revision: 1346584
URL: http://svn.apache.org/viewvc?rev=1346584&view=rev
Log:
Additional fix. Correct context & servlet paths
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1346581
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=1346584&r1=1346583&r2=1346584&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
Tue Jun 5 20:57:16 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/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java?rev=1346584&r1=1346583&r2=1346584&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
Tue Jun 5 20:57:16 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: [email protected]
For additional commands, e-mail: [email protected]