<div dir="ltr">Will this work?<div><br></div><div><div>--- ngx_http_upstream.c.orig<span class="" style="white-space:pre"> </span>2016-03-29 15:09:31.000000000 +0000</div><div>+++ ngx_http_upstream.c<span class="" style="white-space:pre"> </span>2016-04-02 05:28:17.877466756 +0000</div><div>@@ -3990,6 +3990,7 @@</div><div> timeout = u->conf->next_upstream_timeout;</div><div> </div><div> if (u->request_sent</div><div>+ && (ft_type != NGX_HTTP_UPSTREAM_FT_HTTP_404)</div><div> && (r->method & (NGX_HTTP_POST|NGX_HTTP_LOCK|NGX_HTTP_PATCH)))</div><div> {</div><div> ft_type |= NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT;</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 1, 2016 at 8:46 AM, Frank Liu <span dir="ltr"><<a href="mailto:gfrankliu@gmail.com" target="_blank">gfrankliu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can you post a quick patch on how to exclude http_404?<div><br></div><div>Thanks!</div><div>Frank<br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Mar 29, 2016 at 8:26 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<span><br><span class="">
On Tue, Mar 29, 2016 at 08:04:33PM -0700, Frank Liu wrote:<br>
<br>
> It's a custom error code, think of it as if http_404, so if the first<br>
> upstream can't handle this request , it will send "404" saying it is not<br>
> for me, please try next, nginx should then send the same request to next<br>
> upstream.<br>
<br>
</span></span><span class="">Well, nginx can't handle custom error codes in<br>
proxy_next_upstream, so this is probably irrelevant anyway.<br>
Though I was considered excluding http_403 and http_404 from<br>
idempotence checks, it may make sense to do it if there are enough<br>
such use cases.<br></span></blockquote></div></div></div></div>
</blockquote></div><br></div>