Latest update - 7427
This commit is contained in:
@@ -2400,6 +2400,14 @@ ngx_http_subrequest(ngx_http_request_t *r,
|
|||||||
sr->phase_handler = r->phase_handler;
|
sr->phase_handler = r->phase_handler;
|
||||||
sr->write_event_handler = ngx_http_core_run_phases;
|
sr->write_event_handler = ngx_http_core_run_phases;
|
||||||
|
|
||||||
|
#if (NGX_PCRE)
|
||||||
|
sr->ncaptures = r->ncaptures;
|
||||||
|
sr->captures = r->captures;
|
||||||
|
sr->captures_data = r->captures_data;
|
||||||
|
sr->realloc_captures = 1;
|
||||||
|
r->realloc_captures = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
ngx_http_update_location_config(sr);
|
ngx_http_update_location_config(sr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -499,6 +499,10 @@ struct ngx_http_request_s {
|
|||||||
unsigned gzip_vary:1;
|
unsigned gzip_vary:1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (NGX_PCRE)
|
||||||
|
unsigned realloc_captures:1;
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned proxy:1;
|
unsigned proxy:1;
|
||||||
unsigned bypass_cache:1;
|
unsigned bypass_cache:1;
|
||||||
unsigned no_cache:1;
|
unsigned no_cache:1;
|
||||||
|
|||||||
@@ -2504,7 +2504,9 @@ ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re, ngx_str_t *s)
|
|||||||
if (re->ncaptures) {
|
if (re->ncaptures) {
|
||||||
len = cmcf->ncaptures;
|
len = cmcf->ncaptures;
|
||||||
|
|
||||||
if (r->captures == NULL) {
|
if (r->captures == NULL || r->realloc_captures) {
|
||||||
|
r->realloc_captures = 0;
|
||||||
|
|
||||||
r->captures = ngx_palloc(r->pool, len * sizeof(int));
|
r->captures = ngx_palloc(r->pool, len * sizeof(int));
|
||||||
if (r->captures == NULL) {
|
if (r->captures == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user