[PATCH]Add processing of posted requests in ngx_http_wait_request_handler().

Valentin V. Bartenev vbart at nginx.com
Tue Mar 18 13:51:26 UTC 2014


On Tuesday 18 March 2014 09:58:58 flygoast wrote:
> Is this one worked? 
> 
> 
> At 2014-03-07 14:32:43,flygoast <flygoast at 126.com> wrote:
> 
> # HG changeset patch
> # User FengGu <flygoast at 126.com>
> # Date 1394165926 -28800
> #      Fri Mar 07 12:18:46 2014 +0800
> # Node ID c357bd0684560aa2f90f23bdda5dae9cf7f0b13c
> # Parent  e45fa57ef72590d010c8234cb5c3c6e2ae63e157
> Add processing of posted requests in ngx_http_wait_request_handler().
> 
> 
> If something like "error_page 400 /foo" is used in a configuration, when the
> new uri processing failed, the ngx_http_terminate_request(r, -1) would be
> invoked. The request would not be released resulting in socket leak.
> 
> 
> diff -r e45fa57ef725 -r c357bd068456 src/http/ngx_http_request.c
> --- a/src/http/ngx_http_request.c   Thu Mar 06 23:15:10 2014 +0400
> +++ b/src/http/ngx_http_request.c   Fri Mar 07 12:18:46 2014 +0800
> @@ -470,6 +470,7 @@
> 
> 
>      rev->handler = ngx_http_process_request_line;
>      ngx_http_process_request_line(rev);
> +    ngx_http_run_posted_requests(c);
>  }
> 


Seems to me, this is a wrong patch, since ngx_http_wait_request_handler()
isn't the only place, where ngx_http_process_request_line() can be invoked.

  wbr, Valentin V. Bartenev



More information about the nginx-devel mailing list