<div dir="ltr"><div>Nginx evaluates the conditional headers in the following order</div><div><span class="gmail-pl-smi">if_unmodified_since <br></span></div><div><span class="gmail-pl-smi"><span class="gmail-pl-smi">if_match</span></span></div><div><span class="gmail-pl-smi"><span class="gmail-pl-smi"><span class="gmail-pl-smi">if_modified_since</span></span></span></div><div><span class="gmail-pl-smi"><span class="gmail-pl-smi"><span class="gmail-pl-smi"><span class="gmail-pl-smi">if_none_match</span></span></span></span></div><div><span class="gmail-pl-smi"><span class="gmail-pl-smi"><span class="gmail-pl-smi"><span class="gmail-pl-smi"><br></span></span></span></span></div><div>which ignores some of the subtleties mentioned in RFC-7232, which <br></div><div>gives more precedence to etag based validation over time. <br></div><div><span class="gmail-pl-smi"><span class="gmail-pl-smi"><span class="gmail-pl-smi"><span class="gmail-pl-smi"><br></span></span></span></span></div><div><a href="https://tools.ietf.org/html/rfc7232#section-3.4">https://tools.ietf.org/html/rfc7232#section-3.4</a></div>A recipient MUST ignore If-Unmodified-Since if the request contains<br>an If-Match header field; the condition in If-Match is considered to<br>be a more accurate replacement for the condition in<br>If-Unmodified-Since, and the two are only combined for the sake of<br>interoperating with older intermediaries that might not implement<br>If-Match.<br><br><a href="https://tools.ietf.org/html/rfc7232#section-3.3">https://tools.ietf.org/html/rfc7232#section-3.3</a> and<br>A recipient MUST ignore If-Modified-Since if the request contains an<br>If-None-Match header field; the condition in If-None-Match is<br>considered to be a more accurate replacement for the condition in<br>If-Modified-Since, and the two are only combined for the sake of<br>interoperating with older intermediaries that might not implement<br>If-None-Match.<br><br>Along with those I have followed the precedence guidance provided in<br><a href="https://tools.ietf.org/html/rfc7232#section-6">https://tools.ietf.org/html/rfc7232#section-6</a> to change the order of<br><div>conditional headers being evaluated in nginx. <br></div><div><br></div><div>Please let me know if the changes in the patch file looks good. Happy to address any concerns you may have. <br></div><div><br></div><div>- Karthik Uthaman<br></div></div>