diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index a5cd44dcc..02fb4fd1b 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2697,6 +2697,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc) if (r != r->main && r->post_subrequest) { rc = r->post_subrequest->handler(r, r->post_subrequest->data, rc); + r->post_subrequest = NULL; } if (rc == NGX_ERROR