The default index page shouldn't be a directory. It's a 500.
authorreyk <reyk@openbsd.org>
Wed, 23 Jul 2014 22:20:37 +0000 (22:20 +0000)
committerreyk <reyk@openbsd.org>
Wed, 23 Jul 2014 22:20:37 +0000 (22:20 +0000)
usr.sbin/httpd/server_file.c

index 7c2ecf1..980efa4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: server_file.c,v 1.9 2014/07/23 22:18:57 reyk Exp $    */
+/*     $OpenBSD: server_file.c,v 1.10 2014/07/23 22:20:37 reyk Exp $   */
 
 /*
  * Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -64,7 +64,7 @@ server_file_access(struct http_descriptor *desc, char *path, size_t len,
 
                if (!len) {
                        /* Recursion - the index "file" is a directory? */
-                       errno = EACCES;
+                       errno = EINVAL;
                        goto fail;
                }