W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2011

Re: #306: does etag value really use quoted-string

From: Mark Nottingham <mnot@mnot.net>
Date: Fri, 2 Sep 2011 10:30:26 +1000
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Message-Id: <06A68B91-E66B-49AB-9D0C-0B6123C46881@mnot.net>
To: Julian Reschke <julian.reschke@gmx.de>
Looks right to me.

I'm a *little* concerned about how productions like this will be handled:

If-Match: "abc\", "def"

but that's a corner case...



On 02/09/2011, at 4:59 AM, Julian Reschke wrote:

> On 2011-08-30 13:35, Mark Nottingham wrote:
>> <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/306>
>> 
>> IIRC we checked various implementations and found that many don't handle ETags as a quoted-string; therefore, the safe/sensible thing to do is to re-define ETag as a something else; i.e., something with the same syntax, but without any special semantic for backslashes.
>> 
>> We might also caution against including backslashes in them in prose, since it isn't interoperable.
>> 
>> Thoughts / objections?
>> 
>> --
>> Mark Nottingham   http://www.mnot.net/
> 
> Proposed patch: <http://trac.tools.ietf.org/wg/httpbis/trac/attachment/ticket/306/306.diff>
> 
> The definition would then read:
> 
> 2.3.  ETag
> 
>   The ETag header field provides the current entity-tag for the
>   selected representation.  An entity-tag is an opaque validator for
>   differentiating between multiple representations of the same
>   resource, regardless of whether those multiple representations are
>   due to resource state changes over time, content negotiation
>   resulting in multiple representations being valid at the same time,
>   or both.  An entity-tag consists of an opaque quoted string, possibly
>   prefixed by a weakness indicator.
> 
>     ETag       = entity-tag
> 
>     entity-tag = [ weak ] opaque-tag
>     weak       = %x57.2F ; "W/", case-sensitive
>     opaque-tag = DQUOTE *etagc DQUOTE
>     etagc      = %x21 / %x23-7E / obs-text
>                ; VCHAR except double quotes, plus obs-text
> 
>      Note: Previously, opaque-tag was defined to be a quoted-string
>      ([RFC2616], Section 3.11), thus some recipients might perform
>      backslash unescaping.  Servers therefore ought to avoid backslash
>      characters in entity tags.
> 
>      ...
> 
> Best regards, Julian

--
Mark Nottingham   http://www.mnot.net/
Received on Friday, 2 September 2011 00:31:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:47 GMT