From 49dbf201accdc8c63d5a4365a9fbd23aeebf95ee Mon Sep 17 00:00:00 2001 From: Hakase Date: Tue, 3 Mar 2020 18:15:29 +0900 Subject: [PATCH] Latest update - 7632 --- lib/naxsi | 2 +- lib/ngx-fancyindex | 2 +- lib/zlib | 2 +- src/http/ngx_http_request.c | 34 +++++++++++----------------------- 4 files changed, 14 insertions(+), 26 deletions(-) diff --git a/lib/naxsi b/lib/naxsi index e9c3dd7..15e58c3 160000 --- a/lib/naxsi +++ b/lib/naxsi @@ -1 +1 @@ -Subproject commit e9c3dd71338ff2fe4ba381143f7dc2347b339191 +Subproject commit 15e58c3385e339509bf5ea42437d195fa6e0e488 diff --git a/lib/ngx-fancyindex b/lib/ngx-fancyindex index fa13aef..11101de 160000 --- a/lib/ngx-fancyindex +++ b/lib/ngx-fancyindex @@ -1 +1 @@ -Subproject commit fa13aef31b4d663d081a9b0eb8649357fb44de32 +Subproject commit 11101de198d36f85fdb2f6c17fa41f3754690dc4 diff --git a/lib/zlib b/lib/zlib index af9ef2e..372bcd1 160000 --- a/lib/zlib +++ b/lib/zlib @@ -1 +1 @@ -Subproject commit af9ef2e94cb9ffebc8dc6cc6d856e494880d869b +Subproject commit 372bcd151c901418c2721232bf09dc9cdbebafb5 diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index d0596ea..ef9999d 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2502,26 +2502,6 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc) } if (r != r->main) { - clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); - - if (r->background) { - if (!r->logged) { - if (clcf->log_subrequest) { - ngx_http_log_request(r); - } - - r->logged = 1; - - } else { - ngx_log_error(NGX_LOG_ALERT, c->log, 0, - "subrequest: \"%V?%V\" logged again", - &r->uri, &r->args); - } - - r->done = 1; - ngx_http_finalize_connection(r); - return; - } if (r->buffered || r->postponed) { @@ -2534,11 +2514,12 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc) pr = r->parent; - if (r == c->data) { - - r->main->count--; + if (r == c->data || r->background) { if (!r->logged) { + + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + if (clcf->log_subrequest) { ngx_http_log_request(r); } @@ -2553,6 +2534,13 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc) r->done = 1; + if (r->background) { + ngx_http_finalize_connection(r); + return; + } + + r->main->count--; + if (pr->postponed && pr->postponed->request == r) { pr->postponed = pr->postponed->next; }