From: Christophe Jaillet Date: Fri, 16 May 2014 19:37:07 +0000 (+0000) Subject: Tweak a AP_DEBUG_ASSERT condition. X-Git-Tag: 2.5.0-alpha~4194 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80e41b5819347ebd35ffb04b3c219f53d1dd306e;p=apache Tweak a AP_DEBUG_ASSERT condition. Valid index to use 'req_header_var_names' are 0...6 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1595321 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index 8649ca5e11..35ecb16101 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -1433,13 +1433,13 @@ static const char *request_var_fn(ap_expr_eval_ctx_t *ctx, const void *data) } static const char *req_header_var_names[] = { - "HTTP_USER_AGENT", - "HTTP_PROXY_CONNECTION", - "HTTP_REFERER", - "HTTP_COOKIE", - "HTTP_FORWARDED", - "HTTP_HOST", - "HTTP_ACCEPT", + "HTTP_USER_AGENT", /* 0 */ + "HTTP_PROXY_CONNECTION", /* 1 */ + "HTTP_REFERER", /* 2 */ + "HTTP_COOKIE", /* 3 */ + "HTTP_FORWARDED", /* 4 */ + "HTTP_HOST", /* 5 */ + "HTTP_ACCEPT", /* 6 */ NULL }; @@ -1459,7 +1459,7 @@ static const char *req_header_var_fn(ap_expr_eval_ctx_t *ctx, const void *data) int index = (varname - req_header_var_names); const char *name; - AP_DEBUG_ASSERT(index < 6); + AP_DEBUG_ASSERT(index < 7); if (!ctx->r) return "";