diff options
author | Roman Arutyunyan <arut@nginx.com> | 2017-02-10 15:13:41 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2017-02-10 15:13:41 +0300 |
commit | 3e4339eacd35084afae67826295b29ae7ad73dc5 (patch) | |
tree | eeca5877fa551032d4836afe7fd8eee01d78aa35 /src/http/ngx_http_core_module.c | |
parent | da2b2cf1e039630cec84e8b67d99c4d578361b0d (diff) | |
download | nginx-3e4339eacd35084afae67826295b29ae7ad73dc5.tar.gz nginx-3e4339eacd35084afae67826295b29ae7ad73dc5.zip |
Upstream: proxy_cache_background_update and friends.
The directives enable cache updates in subrequests.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index b046235fd..9e128908a 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2566,6 +2566,17 @@ ngx_http_subrequest(ngx_http_request_t *r, *psr = sr; + if (flags & NGX_HTTP_SUBREQUEST_CLONE) { + sr->method = r->method; + sr->method_name = r->method_name; + sr->loc_conf = r->loc_conf; + sr->valid_location = r->valid_location; + sr->phase_handler = r->phase_handler; + sr->write_event_handler = ngx_http_core_run_phases; + + ngx_http_update_location_config(sr); + } + return ngx_http_post_request(sr, NULL); } |