mirror of
https://github.com/nginx/nginx.git
synced 2026-08-28 04:39:05 +00:00
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>
This commit is contained in:
parent
a38455a7f3
commit
b5fd7d5041
1 changed files with 1 additions and 1 deletions
|
|
@ -2257,6 +2257,7 @@ ngx_http_regex_compile(ngx_conf_t *cf, ngx_regex_compile_t *rc)
|
|||
|
||||
re->regex = rc->regex;
|
||||
re->ncaptures = rc->captures;
|
||||
re->name = rc->pattern;
|
||||
|
||||
cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);
|
||||
cmcf->ncaptures = ngx_max(cmcf->ncaptures, re->ncaptures);
|
||||
|
|
@ -2274,7 +2275,6 @@ ngx_http_regex_compile(ngx_conf_t *cf, ngx_regex_compile_t *rc)
|
|||
|
||||
re->variables = rv;
|
||||
re->nvariables = n;
|
||||
re->name = rc->pattern;
|
||||
|
||||
size = rc->name_size;
|
||||
p = rc->names;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue