Re: WGLC #354 - ETags & conditional requests

John Sullivan <jsullivan@velocix.com> Thu, 21 June 2012 15:52 UTC

Return-Path: <ietf-http-wg-request@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 3690D21F859E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 21 Jun 2012 08:52:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oZeH14JiqHSn for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 21 Jun 2012 08:52:12 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 95E5121F85A1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 21 Jun 2012 08:52:10 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Shjfi-0003wC-C7 for ietf-http-wg-dist@listhub.w3.org; Thu, 21 Jun 2012 15:51:50 +0000
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <JSullivan@velocix.com>) id 1ShjfW-0003u5-Jf for ietf-http-wg@listhub.w3.org; Thu, 21 Jun 2012 15:51:38 +0000
Received: from mail-out1.velocix.com ([81.134.152.10] helo=owa.velocix.com) by lisa.w3.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from <JSullivan@velocix.com>) id 1ShjfP-00074c-At for ietf-http-wg@w3.org; Thu, 21 Jun 2012 15:51:36 +0000
Received: from orthrus.eng.velocix.com (172.18.32.42) by exccam.corp.velocix.com (172.18.4.40) with Microsoft SMTP Server (TLS) id 14.2.247.3; Thu, 21 Jun 2012 16:51:03 +0100
Message-ID: <4FE342E7.8010700@velocix.com>
Date: Thu, 21 Jun 2012 16:51:03 +0100
From: John Sullivan <jsullivan@velocix.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.21) Gecko/20090320 Fedora/2.0.0.21-1.fc10 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: Zhong Yu <zhong.j.yu@gmail.com>
CC: Mark Nottingham <mnot@mnot.net>, HTTP Working Group <ietf-http-wg@w3.org>, Ben Niven-Jenkins <ben@niven-jenkins.co.uk>
References: <B5E63193-2450-41AD-A3AA-047755F2189D@niven-jenkins.co.uk> <6B348243-BC1C-48C0-822A-1649FDAF7091@mnot.net> <F65ED7E8-7B71-4DFC-98BC-51FCC1B4936B@mnot.net> <CACuKZqHdp2_sL=V9pg1cnTrYOwWjAzh4+d-wh+qpnFRzONyQ-g@mail.gmail.com>
In-Reply-To: <CACuKZqHdp2_sL=V9pg1cnTrYOwWjAzh4+d-wh+qpnFRzONyQ-g@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Originating-IP: [172.18.32.42]
Received-SPF: none client-ip=81.134.152.10; envelope-from=JSullivan@velocix.com; helo=owa.velocix.com
X-W3C-Hub-Spam-Status: No, score=-1.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01
X-W3C-Scan-Sig: lisa.w3.org 1ShjfP-00074c-At 9a631b077e9233fbfecc78dc77a38316
X-Original-To: ietf-http-wg@w3.org
Subject: Re: WGLC #354 - ETags & conditional requests
Archived-At: <http://www.w3.org/mid/4FE342E7.8010700@velocix.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/13867
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: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
Resent-Message-Id: <E1Shjfi-0003wC-C7@frink.w3.org>
Resent-Date: Thu, 21 Jun 2012 15:51:50 +0000

Zhong Yu wrote:
> A valid use case for GET + If-Match may be a range request.
> 
> If the intermediary has a cached representation with matching tag,
> which it has reason to believe would be the "selected representation"
> from the original server, the intermediary may safely do the shortcut.
> Otherwise the request has to be forwarded to the original server.

Yes. It was only the conditional failure case that I was worried
about, where the usefulness of this header is severely compromised
by an intermediate generating 412s.


> Zhong Yu
> 
> On Wed, Jun 20, 2012 at 10:47 PM, Mark Nottingham <mnot@mnot.net> wrote:
>> <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/354>; related text is at <https://svn.tools.ietf.org/svn/wg/httpbis/draft-ietf-httpbis/latest/p4-conditional.html#header.if-match>
>>
>> Usually, this isn't a problem, because If-Match is only used with methods that to be written through to the origin server. E.g., when you PUT or POST something.
>>
>> However, we shouldn't count on that.
>>
>> One way to address this would be to target the requirements at "origin server" rather than "server"; i.e. to say that we don't expect intermediaries to process If-Match.
>>
>> Thoughts?
>>
>>
>> On 24/04/2012, at 3:47 AM, Ben Niven-Jenkins wrote:
>>
>>> Hi,
>>>
>>> Apologies that this mail misses the WG LC deadline, in Velocix we're reviewing all the HTTPBIS documents but we're a little behind, hence the late comments, sorry. (we're still reviewing so might have more comments as we work through the documents)
>>>
>>> On page 14 of P4 it states:
>>>
>>>  If none of the entity-tags match, or if "*" is given and no current
>>>  representation exists, the server MUST NOT perform the requested
>>>  method.  Instead, the server MUST respond with the 412 (Precondition
>>>  Failed) status code.
>>>
>>> This appears to apply to intermediates, but If-Match has a problem
>>> here that If-Unmodified-Since does not. If a proxy has a cached
>>> entity which has a newer Last-Modified timestamp it *knows* that
>>> the conditional has failed and can generate the required
>>> 412 Precondition Failed response itself. Otherwise it can satisfy
>>> the request from cache. Or relay if there is no current cached
>>> version.
>>>
>>> But because multiple responses with different ETags may exist then a cache receiving If-Match with one etag, when it has a different etag cached, can not know for sure that the request etag does not exist. If it were to respond with a 412 status it would effectively be preventing the use of that conditional.
>>>
>>> It would appear that the only two options available to an intermediate are to satisfy the request in the case of a known match, and relay upstream in all other cases (which would be in conflict with the spec as quoted above).
>>>
>>> Thanks
>>> Ben
>>>
>>>
>>
>> --
>> Mark Nottingham   http://www.mnot.net/
>>
>>
>>
>>
> 
> 


John
--