[PATCH] Named captures: fix usage of more than 2 in one regex

Maxim Dounin mdounin at mdounin.ru
Thu Jan 7 04:39:08 MSK 2010


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1262827023 -10800
# Node ID 63f82eb237a27478057fec345d8ef22e23ac7533
# Parent  a7a3057e1539700d919701aff213b584380f6bfc
Named captures: fix usage of more than 2 in one regex.

Due to typo in code offsets in name-to-number map was correct only for first
and second names.

diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -1743,7 +1743,7 @@ ngx_http_regex_compile(ngx_conf_t *cf, n
 
         v->get_handler = ngx_http_variable_not_found;
 
-        p += i + size;
+        p += size;
     }
 
     return re;



More information about the nginx-devel mailing list