Skip to content

Commit

Permalink
* modules/dav/fs/repos.c (dav_fs_get_resource): Return a 404 rather
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
notroj committed Jul 29, 2024
1 parent 6680ceb commit a288cd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/dav/fs/repos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit a288cd3

Please sign in to comment.