Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50550
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 6 Jan 2011 18:09:23 +0000 (18:09 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 6 Jan 2011 18:09:23 +0000 (18:09 +0000)
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

java/org/apache/naming/resources/ProxyDirContext.java
webapps/docs/changelog.xml

index b86dabf..329f4e5 100644 (file)
@@ -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;
         }
     }
-
-
 }
 
index f7a884f..862b2ec 100644 (file)
         than a list of comma-separated or semi-colon-separated expressions.
         (markt)
       </update>
+      <fix>
+        <bug>50550</bug>: 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)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">