]> granicus.if.org Git - apache/commitdiff
Fix litmus test copy_nodestcoll; 2518 requires that MKCOL MUST fail
authorJoe Orton <jorton@apache.org>
Sat, 13 Mar 2004 12:56:47 +0000 (12:56 +0000)
committerJoe Orton <jorton@apache.org>
Sat, 13 Mar 2004 12:56:47 +0000 (12:56 +0000)
with 409 on missing intermediates:

* modules/dav/fs/repos.c (dav_fs_create_collection): Give a 409 rather
than a 403 if apr_dir_make fails with ENOENT.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102946 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/fs/repos.c

index cf7876534c495ff9ffeacdbbc3b2c12e40210c3f..01dc4f87f12338cdb0afe6f112b03fc3e6bca1a1 100644 (file)
@@ -1011,6 +1011,11 @@ static dav_error * dav_fs_create_collection(dav_resource *resource)
                              "There is not enough storage to create "
                              "this collection.");
     }
+    else if (APR_STATUS_IS_ENOENT(status)) {
+        return dav_new_error(ctx->pool, HTTP_CONFLICT, 0,
+                             "Cannot create collection; intermediate "
+                             "collection does not exist.");
+    }
     else if (status != APR_SUCCESS) {
         /* ### refine this error message? */
         return dav_new_error(ctx->pool, HTTP_FORBIDDEN, 0,