summaryrefslogtreecommitdiff
path: root/usr.sbin/httpd/server_file.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2015-01-06 17:55:29 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2015-01-06 17:55:29 +0000
commit1b38bc46e9cf765c6c44da41f9d56f4a73cedd82 (patch)
tree586f6ae830ff5fbe2dfdfdbaacc3ddbdda37d69a /usr.sbin/httpd/server_file.c
parent92b7c8a5e81ba73b846bac710631b8bc573cbaa1 (diff)
Make httpd return "404 not found" if an intermediate component of a requested
file path does not exist rather than returning "500 internal server error". ok reyk
Diffstat (limited to 'usr.sbin/httpd/server_file.c')
-rw-r--r--usr.sbin/httpd/server_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c
index 6167bdb2304..d1ccce7cadf 100644
--- a/usr.sbin/httpd/server_file.c
+++ b/usr.sbin/httpd/server_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server_file.c,v 1.44 2015/01/04 22:23:58 chrisz Exp $ */
+/* $OpenBSD: server_file.c,v 1.45 2015/01/06 17:55:28 stsp Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -134,6 +134,7 @@ server_file_access(struct httpd *env, struct client *clt,
fail:
switch (errno) {
case ENOENT:
+ case ENOTDIR:
return (404);
case EACCES:
return (403);