On 5/19/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:
Rashmi,
Rashmi Rubdi wrote:
> Thank you both for clarifying, I understand what you're saying.
[snip]
> And the definition of ETag :
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19
>
> mentions entity-tag , which is also the value of a few other caching tags:
>
> If-Match
> If-None-Match
> Vary
Just because each of these headers has an entity-tag as its value does
not mean that the server can just pick one and shove an Etag-appropriate
value into the header. The "entity-tag" is just a data type. It's like
saying "the 'Date' header returns a date" and "the 'Last-Modified-Date'
header also returns a date", therefore you can use the headers
interchangeably.
Got it.
I just wasn't sure if they could be used interchangeably or not, may be not.
> The value of the above tags returns the same checksum for the static
> resource as the ETag does.
Really? That doesn't sound right. The "Vary" header does not contain any
checksum of any kind. (At least not in the HTTP 1.1 spec).
I got confused about the Vary header because over here:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19 it says:
"The headers used with entity tags are described in sections 14.24,
14.26 and 14.44. " where 14.44 points to the Vary header. So you're
right the Vary header does not contain a checksum of any kind.
But as mentioned previously If-Match and If-None-Match do contain the
checksum that represents entity-tag.
> I think ETag's value will only change if the static file's modified
> date changes according to it's definition here:
> http://en.wikipedia.org/wiki/HTTP_ETag
>
> So why have 2 headers with the same checksum for the same static
> resource when one would suffice? Unless the checksum is going to be
> different... which I doubt because it is calculate based on the i-node
> number , last modified time and size (in Apache though, not sure how
> Tomcat calculates it.).
I'm not really sure what you're talking about, here. It seems clear that
the Etag ought to be sent with a 304 response if that same request would
have returned an Etag with a 200 response instead.
As you mentioned it may be a good idea to check with the Dev list or
may be we could file a bug.
The fact that the
Etag shouldn't change isn't the issue... it's the fact that it should be
sent in the response regardless of 2xx or 3xx response.
Got it.
- -chris
-Regards
Rashmi
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]