From: Joe Orton Date: Mon, 29 Jul 2024 08:40:42 +0000 (+0000) Subject: * modules/dav/fs/repos.c (dav_fs_get_resource): Return a 404 rather X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a288cd39ce2f0e05f1cb3e41aa83a9f173ded1e3;p=thirdparty%2Fapache%2Fhttpd.git * modules/dav/fs/repos.c (dav_fs_get_resource): Return a 404 rather 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 --- diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c index 701b4425e06..23d798177c1 100644 --- a/modules/dav/fs/repos.c +++ b/modules/dav/fs/repos.c @@ -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.");