diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 3cca57cf5..3459d2726 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2526,6 +2526,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