On 5/19/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:
Rashmi,

Rashmi Rubdi wrote:
>> 1. Spec says:
>> "The response MUST include the following header fields: ... - ETag
>> and/or Content-Location, if the header would have been sent in a 200
>> response to the same request"
>
> By *same request* , I think you are saying that the request was sent
> from the same browser instance.

I think it means for any two requests that are indistinguishable from
each other. In this case, I totally agree with Len.

Thank you both for clarifying, I understand what you're saying.

I don't mean to go off-track but, since If-None-Match header is being
returned for Http Status 304 , I thought it might be a good idea to
look at it's definition too.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26

The above definition mentions ETag , and the condition when it should
be returned in the response header, but it seems a little unclear to
me, because the sentence starts with "Instead..." , it doesn't fully
explain the context.

"If any of the entity tags match the entity tag of the entity that
would have been returned in the response to a similar GET request
(without the If-None-Match header) on that resource, or if "*" is
given and any current entity exists for that resource, then the server
MUST NOT perform the requested method, unless required to do so
because the resource's modification date fails to match that supplied
in an If-Modified-Since header field in the request.

Instead, if the request method was GET or HEAD, the server SHOULD
respond with a 304 (Not Modified) response, including the cache-
related header fields (particularly ETag) of one of the entities that
matched. For all other request methods, the server MUST respond with a
status of 412 (Precondition Failed)."

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

The value of the above tags returns the same checksum for the static
resource as the ETag does.

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.).

Len, I recommend you cross-post this (if you haven't already) to the
tomcat-dev mailing list to see what they have to say.

- -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]

Reply via email to