From 1d935a7a7bcb24ced9a3cbbc98764183acd3a25b Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Wed, 30 Dec 2015 12:02:49 +0000 Subject: [PATCH] Better check git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722320 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_hcheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/proxy/mod_proxy_hcheck.c b/modules/proxy/mod_proxy_hcheck.c index a9b39fc847..4f214af4e1 100644 --- a/modules/proxy/mod_proxy_hcheck.c +++ b/modules/proxy/mod_proxy_hcheck.c @@ -28,7 +28,7 @@ module AP_MODULE_DECLARE_DATA proxy_hcheck_module; #define HCHECK_WATHCHDOG_INTERVAL (5) static char *methods[] = { - "NULL", "OPTIONS", "HEAD", "GET", "POST", "CPING" + "NULL", "OPTIONS", "HEAD", "GET", "POST", "CPING", NULL }; typedef struct hc_template_t { @@ -78,7 +78,7 @@ static const char *set_worker_hc_param(apr_pool_t *p, return apr_psprintf(p, "Unknown HCheckTemplate name: %s", val); } else if (!strcasecmp(key, "method")) { - for (ival = 1; ival < sizeof(methods); ival++) { + for (ival = 1; methods[ival]; ival++) { if (!ap_casecmpstr(val, methods[ival])) { if (worker) { worker->s->method = ival; -- 2.40.0