Re: Weak validators in conditional requests

On 03.10.2018 10:14, Mark Nottingham wrote:
>> On 4 Sep 2018, at 9:09 pm, Eduard Bagdasaryan<eduard.bagdasaryan@measurement-factory.com>  wrote:
>>
>> Yes, it is stated there, but only about If-Match and If-None-Match
>> headers. What about If-Modified-Since, If-Unmodified-Since
>> and If-Range?
> In 723x, the strong vs. weak comparison function distinction is only defined for ETags, not for Last-Modified. The requirements on comparison for LM are defined here:
>    https://httpwg.org/specs/rfc7232.html#lastmod.comparison
>
> For If-Range, 7233 says:
>
> """
> A server that evaluates an If-Range precondition MUST use the strong comparison function when comparing entity-tags (Section 2.3.2 of [RFC7232]) and MUST evaluate the condition as false if an HTTP-date validator is provided that is not a strong validator in the sense defined by Section 2.2.2 of [RFC7232].
> """
>
> https://httpwg.org/specs/rfc7233.html#header.if-range

Mark, thanks for your reply.

Let's concentrate on an simple example below I've
recently posted here. Clarifying it would help me a lot.

So, a proxy cached a response with two headers below:

[...]
Date: Tue, 15 Aug 2018 12:36:57 GMT
Last-Modified: Tue, 15 Aug 2018 12:36:27 GMT

According to the RFC7273 section 2.2.2 the LM validator is
weak, since the difference between these two fields is less
than 60 seconds.

Then a client sends a range GET request:

[...]
If-Unmodified-Since: Tue, 15 Aug 2018 12:36:27 GMT
Range: bytes=0-5


Can the proxy respond with 206 Partial Content answer?


Thank you,
Ed.

Received on Thursday, 4 October 2018 13:30:51 UTC