proxy_next_upstream and POSTs

Piotr Sikora piotr.sikora at
Tue May 10 18:32:08 MSD 2011


> 2. Any good advice on how I should do it? I was thinking on adding the 
> validation somewhere in ngx_http_upstream_test_next (ngx_http_upstream.c), 
> something like:
> if (r->method == NGX_HTTP_POST) {
>   return NGX_DECLINED;
> }

Keep in mind that you should decline sending request to another backend, 
only if you already sent it upstream. There is a bunch of errors (bad 
gateway, connection timeout, etc) which could lead to the code path in 
question, for which you should still send request to another backend.

Best regards,
Piotr Sikora < piotr.sikora at >

More information about the nginx mailing list