From: stsp Date: Tue, 6 Jan 2015 17:55:28 +0000 (+0000) Subject: Make httpd return "404 not found" if an intermediate component of a requested X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b259b07e460df8380b934668e3767da740044136;p=openbsd 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 --- 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 @@ -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);