You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Geoff Soutter <ge...@whitewolf.com.au> on 2000/08/23 10:23:49 UTC
[PATCH] *proper* fix for default servlets requestURI != contextPath + servletPath + pathInfo
Hi peeps,
Well, I finally got around to doing something properly (ish)... (so, craig,
I finally stopped making excuses!)
I did a proper diff patch for this problem, cleaned up the comments, and
fixed the StaticInterceptor so that it works with the newly correct mapping.
I even tried to do the tests, the servlet ones worked fine but I got a weird
error trying to execute the JSP ones so I gave up on that.
Hope one of you committers is feeling like integrating this fix soon, i'd
really appreciate it.
Cheers
Geoff
Index: SimpleMapper1.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleMap
per1.java,v
retrieving revision 1.16
diff -r1.16 SimpleMapper1.java
399,400c399,402
< s="/";
< pathI= path.substring( ctxPLen ) ;
---
> // NOTE: default servlets have pathInfo in the servletPath
> // yes it's counterintuitive, but thats the way the spec is
> s = path.substring( ctxPLen );
> pathI = null;
Index: StaticInterceptor.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/request/StaticInt
erceptor.java,v
retrieving revision 1.10
diff -r1.10 StaticInterceptor.java
131c131,132
< String pathInfo=req.getPathInfo();
---
> // NOTE: default servlet, so pathInfo is actually the servletPath
> String pathInfo=req.getServletPath();
241c242,243
< String pathInfo=subReq.getPathInfo();
---
> // NOTE: default servlet, so pathInfo is actually the servletPath
> String pathInfo=subReq.getServletPath();
371c373,374
< String pathInfo=subReq.getPathInfo();
---
> // NOTE: default servlet, so pathInfo is actually the servletPath
> String pathInfo=subReq.getServletPath();