Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 4620:204b780a89de
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).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 14 May 2012 09:48:05 +0000 |
parents | c42553296af1 |
children | 07f028df3879 |
comparison
equal
deleted
inserted
replaced
4619:3171ec7d0d05 | 4620:204b780a89de |
---|---|
1931 return; | 1931 return; |
1932 } | 1932 } |
1933 | 1933 |
1934 if (rc == NGX_OK && r->filter_finalize) { | 1934 if (rc == NGX_OK && r->filter_finalize) { |
1935 c->error = 1; | 1935 c->error = 1; |
1936 ngx_http_finalize_connection(r); | |
1936 return; | 1937 return; |
1937 } | 1938 } |
1938 | 1939 |
1939 if (rc == NGX_DECLINED) { | 1940 if (rc == NGX_DECLINED) { |
1940 r->content_handler = NULL; | 1941 r->content_handler = NULL; |