comparison src/http/ngx_http_variables.c @ 5204:a64c8a5da336

PCRE: retain input pattern for all regular expressions. Previously, input pattern was kept only for regular expressions with named captures, which resulted in error log entries without input pattern for PCRE errors that occured while processing regular expressions without them. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
author Piotr Sikora <piotr@cloudflare.com>
date Thu, 02 May 2013 03:26:36 -0700
parents f7fe817c92a2
children 12dd27b74117
comparison
equal deleted inserted replaced
5203:bfb99b75833b 5204:a64c8a5da336
2255 return NULL; 2255 return NULL;
2256 } 2256 }
2257 2257
2258 re->regex = rc->regex; 2258 re->regex = rc->regex;
2259 re->ncaptures = rc->captures; 2259 re->ncaptures = rc->captures;
2260 re->name = rc->pattern;
2260 2261
2261 cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); 2262 cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);
2262 cmcf->ncaptures = ngx_max(cmcf->ncaptures, re->ncaptures); 2263 cmcf->ncaptures = ngx_max(cmcf->ncaptures, re->ncaptures);
2263 2264
2264 n = (ngx_uint_t) rc->named_captures; 2265 n = (ngx_uint_t) rc->named_captures;
2272 return NULL; 2273 return NULL;
2273 } 2274 }
2274 2275
2275 re->variables = rv; 2276 re->variables = rv;
2276 re->nvariables = n; 2277 re->nvariables = n;
2277 re->name = rc->pattern;
2278 2278
2279 size = rc->name_size; 2279 size = rc->name_size;
2280 p = rc->names; 2280 p = rc->names;
2281 2281
2282 for (i = 0; i < n; i++) { 2282 for (i = 0; i < n; i++) {