Hi Chris,

[...]
> My reading of the HTTP/1.1 spec [...] says that an ETag (Entity Tag) 
> is attached to a representation rather than a resource. 
[...]
> ...which says to me that I should generate the tag based on 
> the content 
> of a representation. Does this sound right? 

Absolutely, that's why the "tag" property is only available on the
org.restlet.data.Representation interface. Also, the tag doesn't have to be
necessarily generated "based on" the content of the representation. If not,
you need a way to store this association because this tag has to be
persistent across calls.

> FWIW: this is what I did in the sample app, but I didn't document why. 
> Which means I forgot it within days... 

I saw you used the MD5 algorithm to generate the tag. This is cool, we
should add that feature directly to the NRE/API:
http://restlet.tigris.org/issues/show_bug.cgi?id=149

Note that there is also a "Content-MD5" header that seems to overlap with
you usage of tags. I'm not sure why we have both in the spec:
http://www.rfcsearch.org/rfcview/RFC/2616.html#14.15

Best regards,
Jerome

Reply via email to