summaryrefslogtreecommitdiff
path: root/libexec/httpd
diff options
context:
space:
mode:
authorleot <leot@NetBSD.org>2018-12-15 12:43:24 +0000
committerleot <leot@NetBSD.org>2018-12-15 12:43:24 +0000
commitfab977e2d6a73f2cee2679c6f6dbf396a1ae239d (patch)
tree447f42e7a56f5d88c9ee3bee5f6aafa517d36354 /libexec/httpd
parentaf46bcfe84c140356f3d20ddac12f598bc454533 (diff)
Fix handling of bozo_set_timeout() timeouts (and `-T' option parsing)
Diffstat (limited to 'libexec/httpd')
-rw-r--r--libexec/httpd/bozohttpd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c
index 0dfb3825aa8..4adddecc653 100644
--- a/libexec/httpd/bozohttpd.c
+++ b/libexec/httpd/bozohttpd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.c,v 1.105 2018/12/15 12:39:22 leot Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.106 2018/12/15 12:43:24 leot Exp $ */
/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
@@ -398,7 +398,7 @@ int
bozo_set_timeout(bozohttpd_t *httpd, bozoprefs_t *prefs,
const char *target, const char *val)
{
- const char *cur, *timeouts[] = {
+ const char **cur, *timeouts[] = {
"initial timeout",
"header timeout",
"request timeout",
@@ -408,9 +408,9 @@ bozo_set_timeout(bozohttpd_t *httpd, bozoprefs_t *prefs,
const size_t minlen = 1;
size_t len = strlen(target);
- for (cur = timeouts[0]; len >= minlen && *cur; cur++) {
- if (strncmp(target, cur, len) == 0) {
- bozo_set_pref(httpd, prefs, cur, val);
+ for (cur = timeouts; len >= minlen && *cur; cur++) {
+ if (strncmp(target, *cur, len) == 0) {
+ bozo_set_pref(httpd, prefs, *cur, val);
return 0;
}
}