aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPiotr Sikora <piotr@cloudflare.com>2013-05-02 03:26:36 -0700
committerPiotr Sikora <piotr@cloudflare.com>2013-05-02 03:26:36 -0700
commitb5fd7d5041f80f5c920b0954b5036a8ec1dc06f9 (patch)
tree557beabfea93de3dd4b2e2c70877c270367dc819 /src
parenta38455a7f3924bb1b422dd012e4e7c6243e15e39 (diff)
downloadnginx-b5fd7d5041f80f5c920b0954b5036a8ec1dc06f9.tar.gz
nginx-b5fd7d5041f80f5c920b0954b5036a8ec1dc06f9.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_variables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index 6f1e0344d..0b1a33430 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -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;