Subject: Re: PROPOSAL: Weak Validator definition [i101]

From: Julian Reschke <[email-masked]>
Date: Tue, 29 Jul 2008 20:04:00 +0200

Mark Nottingham wrote:
> 
> I haven't seen any support for Lisa's straw-man proposals, and 
> discussion seems to confirm the below as the direction we want to take 
> this. Closing this one (although there may be other issues nearby...).

Mark and I discussed this yesterday, and Mark came up with a concrete 
proposal (see <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/101>):

> Suggestion:
> 
> P4, section 3:
> 
> A "weak entity tag," indicated by the "W/" prefix, MAY be shared by
> 
>     two entities of a resource only if the entities are equivalent and could be substituted for each other with no significant change in semantics.
> 
> to:
> 
> ... MAY be shared by two representations of a resource only if the origin server considers them to be semantically equivalent.
> 
> Section 5:
> 
>     However, there might be cases when a server prefers to change the validator only on semantically significant changes, and not when insignificant aspects of the entity change. A validator that does not always change when the resource changes is a "weak validator."
> 
>     Entity tags are normally "strong validators," but the protocol provides a mechanism to tag an entity tag as "weak." One can think of a strong validator as one that changes whenever the bits of an entity changes, while a weak value changes whenever the meaning of an entity changes. Alternatively, one can think of a strong validator as part of an identifier for a specific entity, while a weak validator is part of an identifier for a set of semantically equivalent entities.
> 
> Section 6:
> 
>     In order to be legal, a strong entity tag MUST change whenever the associated entity value changes in any way. A weak entity tag SHOULD change whenever the associated entity changes in a semantically significant way.
> 
> to:
> 
> ... A weak entity tag SHOULD change whenever the associated entity changes in a way that the server determines is semantically significant.

Feedback appreciated,

Julian

---

From: Julian Reschke <[email-masked]>
Date: Tue, 29 Jul 2008 20:15:40 +0200

Julian Reschke wrote:
> ...
> ...

Proposed patch: 
<http://www3.tools.ietf.org/wg/httpbis/trac/attachment/ticket/101/i101.diff>.

Note this also drops a leading "In order to be legal..." intro -- it's 
not like we ever talk about entity tags behaving illegally :-)

BR, Julian

---

From: "Brian Smith" <[email-masked]>
Date: Tue, 29 Jul 2008 13:41:41 -0500

Julian Reschke wrote:
> > proposal (see 
> <http://www3.tools.ietf.org/wg/httpbis/trac/ticket/101>):
> > ...
> 
> Proposed patch: 
> Note this also drops a leading "In order to be legal..." 
> intro -- it's not like we ever talk about entity tags 
> behaving illegally :-)

"entity value" is an undefined term that is only used in this one place, and
it could be interpreted as "entity body" inappropriately. "Entity" would be
better since it is defined as the combination as the entity-header fields
and the entity-body.

I would expect that a validator should change whenever the entity changes,
*and* whenever the entity *headers* change as well. For example, changing
the Content-Type from text/plain to text/html is a significant change even
if the entity body stays the same. Otherwise, because of the restrictions on
304 responses containing entity headers, the client could repeatedly get 304
responses and never learn that the content-type changed. Similarly,
conditional PUTs would unknowingly revert an intermediate change in entity
headers.

For example, an ETag generated as the MD5 of just the entity body would not
be a good ETag, but an ETag generated as the MD5 of the entity headers
together with the entity body would be a good ETag.

- Brian

---

From: Julian Reschke <[email-masked]>
Date: Tue, 29 Jul 2008 20:56:10 +0200

> better since it is defined as the combination as the entity-header fields

Right. That's old text though. Will open a new ticket.

> *and* whenever the entity *headers* change as well. For example, changing

I think the entity headers are considered part of the entity. Are there 
specific places that suggest otehrwise.

> together with the entity body would be a good ETag.

Correct.

BR, Julian

---

From: Julian Reschke <[email-masked]>
Date: Tue, 29 Jul 2008 21:02:29 +0200

> Right. That's old text though. Will open a new ticket.

<http://tools.ietf.org/wg/httpbis/trac/ticket/124>.

BR, Julian

---

From: "Brian Smith" <[email-masked]>
Date: Tue, 29 Jul 2008 14:19:32 -0500

Julian Reschke wrote:
> Brian Smith wrote:
> > "entity value" is an undefined term that is only used in this one 
> > place, and it could be interpreted as "entity body" 
> inappropriately. 
> > "Entity" would be better since it is defined as the 
> combination as the 
> > entity-header fields and the entity-body.
> 
> I think the entity headers are considered part of the entity. 
> Are there specific places that suggest otehrwise.

Right, the definition of "entity" is explicit about it. I meant to write
"...whenever the *entity-body* changes..."

- Brian