Found in current trunk and tc6.0.x, and tc5.5.x: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?annotate=734728&pathrev=770809 730 : if(mappingData.wrapper == null && noServletPath) { 731 : // The path is empty, redirect to "/" 732 : mappingData.redirectPath.setChars 733 : (path.getBuffer(), pathOffset, pathEnd); 734 : path.setEnd(pathEnd - 1); 735 : return; 736 : } On line 733 the pathEnd argument is wrong: it should be length, not an index. It should be mappingData.redirectPath.setChars(path.getBuffer(), pathOffset, pathEnd-pathOffset); Do not know, why there are no complaints. May be pathOffset is always zero?
I'd guess pathOffset is (nearly) always zero. I have fixed it in trunk and proposed it for 6.0.x and 5.5.x
This has been fixed in 6.0.x and will be included in 6.0.21 onwards.
This has been fixed in 5.5.x and will be included in 5.5.29 onwards.