Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.0.0beta10
-
Fix Version/s: 6.0.0beta11
-
Component/s: HTTP
-
Labels:None
-
Environment:Windows XP, JDK1.5.0_06
-
Number of attachments :
Description
in ContextHandler.handle(...) {}:
else if (target.startsWith(_contextPath) && (_contextPath.length()==1 || target.charAt(_contextPath.length())=='/'))
Example:
_contextPath="/somepath/"
target="/somepath/servlet"
target.charAt(_contextPath.length()) will result "s" and not "/"
fix would be:
else if (target.startsWith(_contextPath) && (_contextPath.length()==1 || target.charAt(_contextPath.length() - 1)=='/'))
{
if (_contextPath.length()>1)
target=target.substring(_contextPath.length() - 1);
Actually I think the issue here is that the context path should /context not /context/
I have added a check in setContextPath.
cheers