Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
May 14, 2020 06:26PM
Hello!

On Fri, May 01, 2020 at 03:05:05PM -0700, Karthik Uthaman wrote:

> 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.

This was previously discussed in the thread here:

http://mailman.nginx.org/pipermail/nginx-devel/2014-November/006245.html

TL;DR: the required behaviour was changed in RFC 7232 compared to
RFC 2616, and no explanation is known why the change in question
was introduced in RFC 7232. Currently nginx follows RFC 2616 and
checks both validators.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
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 180 May 01, 2020 06:06PM

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

Maxim Dounin 41 May 14, 2020 06:26PM



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

Online Users

Guests: 108
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready