aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-05-14 09:48:05 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-05-14 09:48:05 +0000
commite302ed6fc3ea48f2ccb5bc410d6306522d4f7497 (patch)
treec0cb832919dc5d5d0910aad61f534bf5584e4bee /src/http/ngx_http_request.c
parent7d863c0181064b08fa6b3816522551084fd91af5 (diff)
downloadnginx-e302ed6fc3ea48f2ccb5bc410d6306522d4f7497.tar.gz
nginx-e302ed6fc3ea48f2ccb5bc410d6306522d4f7497.zip
Fixed possible request hang with filter finalization.
With r->filter_finalize set the ngx_http_finalize_connection() wasn't called from ngx_http_finalize_request() called with NGX_OK, resulting in r->main->count not being decremented, thus causing request hang in some rare situations. See here for more details: http://mailman.nginx.org/pipermail/nginx-devel/2012-May/002190.html Patch by Yichun Zhang (agentzh).
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 59d4d4ae6..fa58dd99b 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1933,6 +1933,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
if (rc == NGX_OK && r->filter_finalize) {
c->error = 1;
+ ngx_http_finalize_connection(r);
return;
}