https://bz.apache.org/bugzilla/show_bug.cgi?id=62498

--- Comment #5 from Martin Drößler <m.droess...@handelsblattgroup.com> ---
> Note: testValidateFailure() only passes because it calls
> testValidateInternal(dummyFile, null) but it should be
> testValidateInternal(dummyFile, dummyFile) which currently fails.
Well, thats the whole point. It shouldn't pass. I didn't know that you prefer a
failing test for the correct behaviour instead of a working test to demonstrate
the wrong behaviour.


> I can't see a way to trigger this with VirtualDirContext either.
Well, I do! So let me show you:

Compare the following lines of VirtualDirContext: 215 and 305

In the second one (part of the method "doLookup") the path variable is extended
to have a trailing slash - as is should be!

But in the other (part of method "file") it's not! You check for 
> name.startsWith(path + "/")
but then do a 
> String res = name.substring(path.length())
which of course will result in "/" - which is then passed to 
> file = new File(resourcesDir, res);
and this results in exactly the described behaviour!

Do you really want me to implement a whole webapp to further demonstrate this
obvious bug?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to