]> git.kaiwu.me - nginx.git/commit
Copy regex unnamed captures to cloned subrequests.
authorRoman Arutyunyan <arut@nginx.com>
Tue, 11 Dec 2018 10:09:00 +0000 (13:09 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Tue, 11 Dec 2018 10:09:00 +0000 (13:09 +0300)
commit746fba0d79c6909e9e09b4d1cb9ddbf052ab545e
tree3d0fb8a6a475c69bab1971030fe52142523f54bb
parent7b7f7c1458a66d2ed53e547a2efa775b04034f89
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_core_module.c
src/http/ngx_http_request.h
src/http/ngx_http_variables.c