Module Name: src
Committed By: mrg
Date: Sun Nov 25 07:37:20 UTC 2018
Modified Files:
src/libexec/httpd: bozohttpd.c main.c
Log Message:
fix -X option parsing. noted by Rajeev V. Pillai.
To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.21 -r1.22 src/libexec/httpd/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.98 src/libexec/httpd/bozohttpd.c:1.99
--- src/libexec/httpd/bozohttpd.c:1.98 Sat Nov 24 18:38:59 2018
+++ src/libexec/httpd/bozohttpd.c Sun Nov 25 07:37:20 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.c,v 1.98 2018/11/24 18:38:59 mrg Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.99 2018/11/25 07:37:20 mrg Exp $ */
/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
@@ -109,7 +109,7 @@
#define INDEX_HTML "index.html"
#endif
#ifndef SERVER_SOFTWARE
-#define SERVER_SOFTWARE "bozohttpd/20181124"
+#define SERVER_SOFTWARE "bozohttpd/20181125"
#endif
#ifndef PUBLIC_HTML
#define PUBLIC_HTML "public_html"
Index: src/libexec/httpd/main.c
diff -u src/libexec/httpd/main.c:1.21 src/libexec/httpd/main.c:1.22
--- src/libexec/httpd/main.c:1.21 Sat Nov 24 02:30:56 2018
+++ src/libexec/httpd/main.c Sun Nov 25 07:37:20 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.21 2018/11/24 02:30:56 mrg Exp $ */
+/* $NetBSD: main.c,v 1.22 2018/11/25 07:37:20 mrg Exp $ */
/* $eterna: main.c,v 1.6 2011/11/18 09:21:15 mrg Exp $ */
/* from: eterna: bozohttpd.c,v 1.159 2009/05/23 02:14:30 mrg Exp */
@@ -336,10 +336,6 @@ main(int argc, char **argv)
bozo_set_pref(&httpd, &prefs, "enable users", "true");
break;
- bozo_set_pref(&httpd, &prefs, "directory indexing",
- "true");
- break;
-
case 'V':
bozo_set_pref(&httpd, &prefs, "unknown slash", "true");
break;
@@ -352,6 +348,10 @@ main(int argc, char **argv)
if (!have_dirindex)
goto no_dirindex_support;
+ bozo_set_pref(&httpd, &prefs, "directory indexing",
+ "true");
+ break;
+
case 'x':
bozo_set_pref(&httpd, &prefs, "index.html", optarg);
break;