Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] PCRE: retain input pattern for all regular expressions

Valentin V. Bartenev
May 07, 2013 09:10PM
On Thursday 02 May 2013 14:32:51 Piotr Sikora wrote:
> # HG changeset patch
> # User Piotr Sikora <piotr@cloudflare.com>
> # Date 1367490396 25200
> # Node ID c6434a8634386be8b9bfb90be47c4902a009b36b
> # Parent 886800caf36081e1fcbecd0483abeefbafc781b3
> 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>
>

Nice catch, thank you. I will push it after Maxim Dounin's acknowledgment.

wbr, Valentin V. Bartenev


> diff -r 886800caf360 -r c6434a863438 src/http/ngx_http_variables.c
> --- a/src/http/ngx_http_variables.c Mon Apr 29 18:58:58 2013 +0400
> +++ b/src/http/ngx_http_variables.c Thu May 02 03:26:36 2013 -0700
> @@ -2257,6 +2257,7 @@
>
> 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 @@
>
> re->variables = rv;
> re->nvariables = n;
> - re->name = rc->pattern;
>
> size = rc->name_size;




_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] PCRE: retain input pattern for all regular expressions

Piotr Sikora 1263 May 02, 2013 06:34AM

Re: [PATCH] PCRE: retain input pattern for all regular expressions

Maxim Konovalov 768 May 06, 2013 10:38AM

Re: [PATCH] PCRE: retain input pattern for all regular expressions

Valentin V. Bartenev 788 May 07, 2013 09:10PM

Re: [PATCH] PCRE: retain input pattern for all regular expressions

Maxim Dounin 664 May 11, 2013 01:32PM

Re: [PATCH] PCRE: retain input pattern for all regular expressions

VBart 1265 May 11, 2013 06:18PM

Re: [PATCH] PCRE: retain input pattern for all regular expressions

Vadim Lazovskiy 777 May 12, 2013 05:38AM

Re: [PATCH] PCRE: retain input pattern for all regular expressions

Maxim Dounin 760 May 13, 2013 08:32AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 149
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready