Karthik Uthaman
May 01, 2020 06:06PM
Nginx evaluates the conditional headers in the following order
if_unmodified_since
if_match
if_modified_since
if_none_match

which ignores some of the subtleties mentioned in RFC-7232, which
gives more precedence to etag based validation over time.

https://tools.ietf.org/html/rfc7232#section-3.4
A recipient MUST ignore If-Unmodified-Since if the request contains
an If-Match header field; the condition in If-Match is considered to
be a more accurate replacement for the condition in
If-Unmodified-Since, and the two are only combined for the sake of
interoperating with older intermediaries that might not implement
If-Match.

https://tools.ietf.org/html/rfc7232#section-3.3 and
A recipient MUST ignore If-Modified-Since if the request contains an
If-None-Match header field; the condition in If-None-Match is
considered to be a more accurate replacement for the condition in
If-Modified-Since, and the two are only combined for the sake of
interoperating with older intermediaries that might not implement
If-None-Match.

Along with those I have followed the precedence guidance provided in
https://tools.ietf.org/html/rfc7232#section-6 to change the order of
conditional headers being evaluated in nginx.

Please let me know if the changes in the patch file looks good. Happy to
address any concerns you may have.

- Karthik Uthaman
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Follow RFC-7232 while evaluating the precedence of conditional headers Attachments

Karthik Uthaman 394 May 01, 2020 06:06PM

Re: [PATCH] Follow RFC-7232 while evaluating the precedence of conditional headers

Maxim Dounin 147 May 14, 2020 06:26PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 292
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready