lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On 1-Feb-07, at 3:10 PM, PA wrote:


Yes... but I'm still not 100% clear about somewhat basic things like do you gzip a response first and then compute it's etag or the other way around... when requesting a range, does that apply to the encoded content or not... how does a conditional requests fits with a range request, etc...


My understanding, which may not be right :), is that an Etag identifies an actual entity, not a transmission of an entity. So it's computed on the entire original object, not the transmission encoding of the object (or the bits of the object which are being transmitted on a range request.)

Note that there is a difference between requesting an object which is in compressed format, and compressing the tranmission of a request of an object. In the former case, the etag would apply to the compressed data; in the latter case to the uncompressed data. ("The bits of the entity" is what RFC-2616 says, non-normatively.)

Etags only have to be unique between different variants of the same resource; i.e. if the url's are identical. Using a hash is common but not obligatory; as RFC-2616 says, you could simply attach a version number to a given resource and increment it on each modification.