<div dir="ltr">Hi guys<div><br></div><div>Hello guys</div><div><br></div><div>Nginx keepalive seems to retry automatically on failure. <span style="font-size:12.800000190734863px;font-family:arial,sans-serif">However for non-idempotent requests, it is incorrect by RFC to retry automatically because the server could have changed its state before nginx detected the error.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Is this a bug that would be fixed or did I not get it right?</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Relevant RFC section</span><br style="font-family:arial,sans-serif;font-size:12.800000190734863px">

<br style="font-family:arial,sans-serif;font-size:12.800000190734863px"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">A client, server, or proxy MAY close the transport connection at any time. For example, a client might have started to send a new request at the same time that the server has decided to close the "idle" connection. >From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.</span><br style="font-family:arial,sans-serif;font-size:12.800000190734863px">

<br style="font-family:arial,sans-serif;font-size:12.800000190734863px"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">This means that clients, servers, and proxies MUST be able to recover from asynchronous close events. Client software SHOULD reopen the transport connection and retransmit the aborted sequence of requests without user interaction so long as the request sequence is idempotent (see section 9.1.2). Non-idempotent methods or sequences MUST NOT be automatically retried, although user agents MAY offer a human operator the choice of retrying the request(s). Confirmation by user-agent software with semantic understanding of the application MAY substitute for user confirmation. The automatic retry SHOULD NOT be repeated if the second sequence of requests fails.</span><br>

</div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Regards</span></div><div style><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Fasih</span></div>
</div>