Skip to content

Commit c584c7c

Browse files
committed
Additional fix for BZ 58660
When Mapper root redirect is enabled, ensure '/' is added to path for redirect git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1716894 13f79535-47bb-0310-9956-ffa450edef68
1 parent c11cd2d commit c584c7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/org/apache/catalina/mapper/Mapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,10 @@ private final void internalMapWrapper(ContextVersion contextVersion,
879879
if(mappingData.wrapper == null && noServletPath &&
880880
mappingData.context.getMapperContextRootRedirectEnabled()) {
881881
// The path is empty, redirect to "/"
882+
path.append('/');
883+
pathEnd = path.getEnd();
882884
mappingData.redirectPath.setChars
883-
(path.getBuffer(), pathOffset, pathEnd-pathOffset);
885+
(path.getBuffer(), pathOffset, pathEnd - pathOffset);
884886
path.setEnd(pathEnd - 1);
885887
return;
886888
}

0 commit comments

Comments
 (0)