aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c11
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);
}