]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/dav/fs/repos.c (dav_fs_get_resource): Return a 404 rather
authorJoe Orton <jorton@apache.org>
Mon, 29 Jul 2024 08:40:42 +0000 (08:40 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 29 Jul 2024 08:40:42 +0000 (08:40 +0000)
  than a 400 where r->path_info is not empty for a file; a valid but
  unsatisfiable request to a path which cannot exist,
  e.g. /dav/foo.txt/blah where /dav/foo.txt is not a directory.

Github: closes #465

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

modules/dav/fs/repos.c

index 701b4425e0630506643e98e9db7117dcab3b7fe1..23d798177c1839549acc46fc0cbf1a6c013aa15f 100644 (file)
@@ -777,10 +777,10 @@ static dav_error * dav_fs_get_resource(
             {
                 /*
                 ** The base of the path refers to a file -- nothing should
-                ** be in path_info. The resource is simply an error: it
+                ** be in path_info. The resource cannot exist: it
                 ** can't be a null or a locknull resource.
                 */
-                return dav_new_error(r->pool, HTTP_BAD_REQUEST, 0, 0,
+                return dav_new_error(r->pool, HTTP_NOT_FOUND, 0, 0,
                                      "The URL contains extraneous path "
                                      "components. The resource could not "
                                      "be identified.");