From 746fba0d79c6909e9e09b4d1cb9ddbf052ab545e Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Tue, 11 Dec 2018 13:09:00 +0300 Subject: Copy regex unnamed captures to cloned subrequests. Previously, unnamed regex captures matched in the parent request, were not available in a cloned subrequest. Now 3 fields related to unnamed captures are copied to a cloned subrequest: r->ncaptures, r->captures and r->captures_data. Since r->captures cannot be changed by either request after creating a clone, a new flag r->realloc_captures is introduced to force reallocation of r->captures. The issue was reported as a proxy_cache_background_update misbehavior in http://mailman.nginx.org/pipermail/nginx/2018-December/057251.html. --- src/http/ngx_http_request.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/http/ngx_http_request.h') diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 6bfff96ef..fce70efe6 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -499,6 +499,10 @@ struct ngx_http_request_s { unsigned gzip_vary:1; #endif +#if (NGX_PCRE) + unsigned realloc_captures:1; +#endif + unsigned proxy:1; unsigned bypass_cache:1; unsigned no_cache:1; -- cgit