Re: Weak validators in conditional requests

Eduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com> Thu, 04 October 2018 13:34 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AFC08130E7F for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 4 Oct 2018 06:34:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.65
X-Spam-Level:
X-Spam-Status: No, score=-2.65 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id knhDPOWk-AKV for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 4 Oct 2018 06:33:55 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3AAAD130E4B for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 4 Oct 2018 06:33:55 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1g83iP-0006zm-S3 for ietf-http-wg-dist@listhub.w3.org; Thu, 04 Oct 2018 13:30:53 +0000
Resent-Date: Thu, 04 Oct 2018 13:30:53 +0000
Resent-Message-Id: <E1g83iP-0006zm-S3@frink.w3.org>
Received: from mimas.w3.org ([2603:400a:ffff:804:801e:34:0:4f]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <eduard.bagdasaryan@measurement-factory.com>) id 1g83iN-0006xi-Iy for ietf-http-wg@listhub.w3.org; Thu, 04 Oct 2018 13:30:51 +0000
Received: from mail.measurement-factory.com ([104.237.131.42]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <eduard.bagdasaryan@measurement-factory.com>) id 1g83iL-0002xa-Qs for ietf-http-wg@w3.org; Thu, 04 Oct 2018 13:30:51 +0000
Received: from [192.168.1.70] (128-69-232-149.broadband.corbina.ru [128.69.232.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.measurement-factory.com (Postfix) with ESMTPSA id 26543E038 for <ietf-http-wg@w3.org>; Thu, 4 Oct 2018 13:30:27 +0000 (UTC)
To: ietf-http-wg@w3.org
References: <bf5a9b56-c416-d4ab-2fbe-ac9b0482dcaa@measurement-factory.com> <0ACB722F-BC39-49BE-9401-F01193E45DAD@mnot.net> <59f34446-46d1-7988-dae8-81bb799f68f9@measurement-factory.com> <4DB4F718-C06B-45AA-869F-CD6907555559@mnot.net>
From: Eduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Message-ID: <5e560fe0-442a-f199-64a9-bf32106770bd@measurement-factory.com>
Date: Thu, 04 Oct 2018 16:30:22 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <4DB4F718-C06B-45AA-869F-CD6907555559@mnot.net>
Content-Type: multipart/alternative; boundary="------------6CC552F36CF5BFC6BCADACFC"
Content-Language: en-US
X-W3C-Hub-Spam-Status: No, score=-4.0
X-W3C-Hub-Spam-Report: AWL=-0.149, BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1g83iL-0002xa-Qs bb6069c902f8106d703081e1fdcf52f6
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Weak validators in conditional requests
Archived-At: <https://www.w3.org/mid/5e560fe0-442a-f199-64a9-bf32106770bd@measurement-factory.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/35944
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

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.