Subject: Re: NEW ISSUE: example for matching functions, was: Weak and strong ETags

From: Mark Nottingham <[email-masked]>
Date: Mon, 16 Jul 2007 20:25:31 -0700

Sorry, I missed this because it was buried inside a thread. Now i71;
   http://www.w3.org/Protocols/HTTP/1.1/rfc2616bis/issues/#i71

On 28/05/2007, at 4:36 AM, Julian Reschke wrote:

>
> Hi,
>
> I'm currently going through <http://www.w3.org/Protocols/HTTP/1.1/ 
> rfc2616bis/draft-lafon-rfc2616bis-latest.html>, checking for  
> changes that currenly do not appear in the issues list at <http:// 
> www.w3.org/Protocols/HTTP/1.1/rfc2616bis/issues/>.
>
> This is one of these... (in context: <http://www.w3.org/Protocols/ 
> HTTP/1.1/rfc2616bis/draft-lafon-rfc2616bis-latest.html#rfc.section. 
> 13.3.3>):
>
> Julian Reschke wrote:
>> Hi,
>> given the fact that more than a few persons were confused about  
>> the weak matching function, I'd propose to add an example here, to  
>> appear below the definitions in 13.3.3:
>>     The example below shows the results for a set of entity tag  
>> pairs,
>>     and both the weak and strong comparison function results:
>>          +--------+--------+-------------------+-----------------+
>>          | ETag 1 | ETag 2 | Strong Comparison | Weak Comparison |
>>          +--------+--------+-------------------+-----------------+
>>          | W/"1"  | W/"1"  | no match          | match           |
>>          |        |        |                   |                 |
>>          | W/"1"  | W/"2"  | no match          | no match        |
>>          |        |        |                   |                 |
>>          | W/"1"  | "1"    | no match          | match           |
>>          |        |        |                   |                 |
>>          | "1"    | "1"    | match             | match           |
>>          +--------+--------+-------------------+-----------------+
>> Best regards, Julian
>
> (a) Do we have agreement that this example is correct?
>
> (b) Is there consensus to have it included?
>
> Best regards, Julian
>

--
Mark Nottingham     http://www.mnot.net/

---

From: "Justin Erenkrantz" <[email-masked]>
Date: Tue, 17 Jul 2007 12:39:22 +0200

On 5/29/07, Henrik Nordstrom <[email-masked]> wrote:
> > (That would also improve cache hits with Apache's method - which uses
> > a weak Etag for resources with a recent time, then converts to a
> > strong Etag with the same value after the time has passed).
>
> Already the case, if Apache follows the RFC.. The initial response will
> have a weak ETag, which is then used in If-None-Match and should compare
> true even after it has been upgraded to a strong one.

FWIW, this isn't the case.  httpd will always return false for weak
ETags - except for the case of Range GET/HEAD requests that present a
weak ETag.  See ap_meets_conditions() in:

http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/http/http_protocol.c

HTH.  -- justin