]> granicus.if.org Git - apache/commitdiff
Tweak a AP_DEBUG_ASSERT condition.
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 16 May 2014 19:37:07 +0000 (19:37 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 16 May 2014 19:37:07 +0000 (19:37 +0000)
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

server/util_expr_eval.c

index 8649ca5e113f6d4abcd31c2f1bf24da1b47f18cf..35ecb16101d08f26b13afdda87b77975c06de187 100644 (file)
@@ -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 "";