From: markt Date: Thu, 6 Jan 2011 18:09:23 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50550 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=594eecf4f8a8c7b27619bbfb999761bec83893c9;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50550 Make sure PROPFIND,MKCOL,PROPFIND returns 404,201,207 rather than 404,201,404 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1055975 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/naming/resources/ProxyDirContext.java b/java/org/apache/naming/resources/ProxyDirContext.java index b86dabfd3..329f4e59c 100644 --- a/java/org/apache/naming/resources/ProxyDirContext.java +++ b/java/org/apache/naming/resources/ProxyDirContext.java @@ -1694,10 +1694,16 @@ public class ProxyDirContext implements DirContext { if (cache == null) return false; synchronized (cache) { - return cache.unload(name); + boolean result = cache.unload(name); + // To ensure correct operation, particularly of WebDAV, unload + // the resource with and without a trailing / + if (name.endsWith("/")) { + cache.unload(name.substring(0, name.length() -1)); + } else { + cache.unload(name + "/"); + } + return result; } } - - } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index f7a884fa8..862b2eccc 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -184,6 +184,11 @@ than a list of comma-separated or semi-colon-separated expressions. (markt) + + 50550: When a new directory is created (e.g. via WebDAV) + ensure that a subsequent request for that directory does not result in a + 404 response. (markt) +