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

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
The code is not equivalent. For reference, the original code:

Line
82        if (path.charAt(path.length() - 1) != '/') {
83            path = path + '/';
84        }
85
86        if (webAppMount.startsWith(path)) {
87            String name = path.substring(0, path.length() - 1);
88            name = name.substring(name.lastIndexOf('/') + 1);
89            if (name.length() > 0) {
90                return new VirtualResource(root, path, name);
91            }
92        }

The proposed solution avoids appending "/" on line 83 but then the predicate on
line 86 is not modified in the proposal, and webappMount.startsWith(path) is no
longer guaranteed to end in a "/".

I think the proposal needs a little adjustment.

-- 
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