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

Re: Etag-on-write, 2nd attempt (== IETF draft 01)

From: Julian Reschke <julian.reschke@gmx.de>
Date: Thu, 14 Sep 2006 13:37:27 +0200
Message-ID: <45093EF7.7040604@gmx.de>
To: Jamie Lokier <jamie@shareable.org>
CC: Yves Lafon <ylafon@w3.org>, Lisa Dusseault <lisa@osafoundation.org>, Helge Hess <helge.hess@opengroupware.org>, HTTP Working Group <ietf-http-wg@w3.org>

Jamie Lokier schrieb:
> Yves Lafon wrote:
>> Clients have local caches, but it doesn't really matter, as having the 
>> modified copy or the original one won't trigger an extra rewrite (ie: the 
>> cvs version is not changed) in case of a subsequent PUT without any other 
>> modifications, so per rfc2616,13.3.3, it is indeed a strong validator.
> 
> Firstly, what about _other_ clients using the same intermediate proxy
> cache.  They'll see the PUT entity without modifications too.
> Which may be fine, or it may be an unintended side effect.

As far as I can tell, proxies are not allowed to use the entity sent 
with PUT for updating the cache:

"If the request passes through a cache and the Request-URI identifies 
one or more currently cached entities, those entries SHOULD be treated 
as stale. Responses to this method are not cacheable." 
(<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.9.6.p.2>).

> Secondly, byte-range requests to refresh partially cached entities.
> Those are allowed with a strong Etag (not a weak one), and they'll do
> the wrong thing unless the server simply refuses them.

No, they will do exactly the right thing, as long as the client complies 
to RFC2616 (remember that it says that the ETag is for the stored 
entity, not the submitted one).

> So a server which behaves this way should refuse byte range requests
> when sent an "If-Match" with an Etag corresponding to an entity that
> it rewrote, at least if the rewriting would clash with the byte ranges.

It could do that, but I don't think it's necessary for correctly working 
clients.

>>>> Would it be OK for a server to return a 205 Reset Content with the Etag ?
>>>> That way the client would know that a refetch is in order.
>>> That seems good to me so far.
>> Of course the issue is already deployed software, but every new way of 
>> handling this issue won't solve the way they behave.
>> It would be interesting to get the number of clients implementing 205.
> 
> In RFC 2616, 10.2.6 205 Reset Content, it says nothing about telling
> the client to refetch the content.
> 
> Only things about document views and forms.
> 
> So even if there are clients which implement 205, there's no reason to
> believe it would have the effect desired here.

Correct. And again; returning 205 upon PUT violates a SHOULD-level 
requirement:

"If an existing resource is modified, either the 200 (OK) or 204 (No 
Content) response codes SHOULD be sent to indicate successful completion 
of the request." 
(<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.9.6.p.1>).

Best regards, Julian
Received on Thursday, 14 September 2006 11:37:40 GMT

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