Re: Missing ETag in 304 Header

2007-06-02 Thread Len Popp

I submitted a fix for this, and it has been accepted for release
5.5.24 and 6.0.14.
Bugzilla report: http://issues.apache.org/bugzilla/show_bug.cgi?id=42497
--
Len

On 5/16/07, Joe Mun [EMAIL PROTECTED] wrote:

Hi guys... so according to the HTTP 1.1 spec (
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), 304 Not Modified
responses must include the ETag in the header.  However, Tomcat doesn't seem
to be adding it...

I am serving a static text file, and the header only returns:

HTTP/1.x 304 Not Modified
Server: Apache-Coyote/1.1
Date: Wed, etc...

Is there a reason that the Etag is not being included?  Is there a way to
configure Tomcat to include this? My company is working with a caching
solution provider, and they are complaining about the missing ETag.

thanks.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Missing ETag in 304 Header

2007-05-19 Thread Rashmi Rubdi

On 5/16/07, Joe Mun [EMAIL PROTECTED] wrote:

Hi guys... so according to the HTTP 1.1 spec (
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), 304 Not Modified
responses must include the ETag in the header.


Well, according to RFC 2616's section 10.3.5 on  304 Not Modified

- ETag and/or Content-Location, if the header would have been sent
   in a 200 response to the same request   , but the header is
sent in a 304 response.

That's why there's no ETag


I am serving a static text file, and the header only returns:

HTTP/1.x 304 Not Modified
Server: Apache-Coyote/1.1
Date: Wed, etc...


A 304 however returns If-None-Match which includes entity-tag , which
is the same as ETag for the requested resource.

RFC2616
14.26 If-None-Match
If-None-Match = If-None-Match : ( * | 1#entity-tag )


Status=Not Modified - 304
If-None-Match=  W/13035-1163859776458



Status=OK - 200
Etag=W/13035-1163859776458




Is there a reason that the Etag is not being included?


Because it is not supposed to be included --- see above.


Is there a way to
configure Tomcat to include this? My company is working with a caching
solution provider, and they are complaining about the missing ETag.


The caching provider should be looking for Http Status code.

If they status code is 200 , then they should look for Etag header, if
the status code is 304 then they should look for If-None-Match header.



thanks.



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



Re: Missing ETag in 304 Header

2007-05-19 Thread Len Popp

I think you've got that wrong.

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

2. ETag header *was* sent in a 200 response to the same request. (See
the header logs I posted earlier.)

3. Therefore, the 304 response must include the ETag.
(I'm pretty sure that's right, it seems straightforward to me.)
--
Len

On 5/19/07, Rashmi Rubdi [EMAIL PROTECTED] wrote:

On 5/16/07, Joe Mun [EMAIL PROTECTED] wrote:
 Hi guys... so according to the HTTP 1.1 spec (
 http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), 304 Not Modified
 responses must include the ETag in the header.

Well, according to RFC 2616's section 10.3.5 on  304 Not Modified

- ETag and/or Content-Location, if the header would have been sent
in a 200 response to the same request   , but the header is
sent in a 304 response.

That's why there's no ETag

 I am serving a static text file, and the header only returns:

 HTTP/1.x 304 Not Modified
 Server: Apache-Coyote/1.1
 Date: Wed, etc...

A 304 however returns If-None-Match which includes entity-tag , which
is the same as ETag for the requested resource.

RFC2616
14.26 If-None-Match
If-None-Match = If-None-Match : ( * | 1#entity-tag )


Status=Not Modified - 304
If-None-Match=  W/13035-1163859776458



Status=OK - 200
Etag=W/13035-1163859776458



 Is there a reason that the Etag is not being included?

Because it is not supposed to be included --- see above.

 Is there a way to
 configure Tomcat to include this? My company is working with a caching
 solution provider, and they are complaining about the missing ETag.

The caching provider should be looking for Http Status code.

If they status code is 200 , then they should look for Etag header, if
the status code is 304 then they should look for If-None-Match header.


 thanks.


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




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Missing ETag in 304 Header

2007-05-19 Thread Rashmi Rubdi

I might be wrong but I have a few doubts

On 5/19/07, Len Popp [EMAIL PROTECTED] wrote:

I think you've got that wrong.

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.

So on first load of the static resource
http://localhost:8080/tomcat.gif , the Http Status is 200

On second load (when browser is refreshed), but the static resource is
now cached and so  the Http Status is 304.

But HTTP is stateless, how will the server know about the *same request* ?

Please correct me if I'm wrong, but it is my understanding that when
the browser is refreshed , a new request is sent hence, it is not the
*same request* .



2. ETag header *was* sent in a 200 response to the same request. (See
the header logs I posted earlier.)

3. Therefore, the 304 response must include the ETag.
(I'm pretty sure that's right, it seems straightforward to me.)
--
Len


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



Re: Missing ETag in 304 Header

2007-05-19 Thread Rashmi Rubdi

On 5/19/07, Rashmi Rubdi [EMAIL PROTECTED] 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


Just to test this, I created a JSP and put a jsp:froward tag inside
the JSP, that *forwards* the
*same request* to the static resource.

In this case I got back an ETag, because the request to the JSP
returns a 200 status code, and on JSP forward the same 200 status code
is maintained.

But as mentioned in my previous post, I think the browser refresh
generates a new request, so the server would not know whether the
static resource was requested from the same request or a new request.

So then, the fact that the ETag doesn't appear is correct behavior IMHO.

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



Re: Missing ETag in 304 Header

2007-05-19 Thread Len Popp

It's hypothetical. It says *if* the header *would have* been sent in
a 200 response to the same request. I can know what Tomcat would have
done, because I've seen what it *does* do with requests that are
identical. In my test case, Tomcat *would have* included an ETag
header *if* it responded 200 (because that's what it always does when
it responds 200), therefore it *must* include an ETag header when it
responds with a 304.
--
Len

On 5/19/07, Rashmi Rubdi [EMAIL PROTECTED] wrote:

I might be wrong but I have a few doubts

On 5/19/07, Len Popp [EMAIL PROTECTED] wrote:
 I think you've got that wrong.

 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.

So on first load of the static resource
http://localhost:8080/tomcat.gif , the Http Status is 200

On second load (when browser is refreshed), but the static resource is
now cached and so  the Http Status is 304.

But HTTP is stateless, how will the server know about the *same request* ?

Please correct me if I'm wrong, but it is my understanding that when
the browser is refreshed , a new request is sent hence, it is not the
*same request* .


 2. ETag header *was* sent in a 200 response to the same request. (See
 the header logs I posted earlier.)

 3. Therefore, the 304 response must include the ETag.
 (I'm pretty sure that's right, it seems straightforward to me.)
 --
 Len

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




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Missing ETag in 304 Header

2007-05-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

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.

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

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGT2WW9CaO5/Lv0PARAg9FAJ0XdEvzyyfB7RH/oifKPuK+DwBH8wCffLE1
7A1h+GbA/tlh6xNuMuAOL2Y=
=Igah
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Missing ETag in 304 Header

2007-05-19 Thread Rashmi Rubdi

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]



Re: Missing ETag in 304 Header

2007-05-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

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.

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

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGT3GC9CaO5/Lv0PARAtlNAJ0VofZyKlWiwoAVDE4f6dse1QxXLACfVRap
RdLFVUr9U7HNh1NTeP7iyyM=
=jwsf
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Missing ETag in 304 Header

2007-05-19 Thread Rashmi Rubdi

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]



Re: Missing ETag in 304 Header

2007-05-19 Thread Len Popp

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

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.


I will do this, today if I have time.
--
Len

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Missing ETag in 304 Header

2007-05-18 Thread Reich, Matthias
Hi,

the spec says that a 304 response MUST include header

- ETag and/or Content-Location, if the header would have been sent
in a 200 response to the same request 

Does Tomcat send an ETag header in a 200 response when it serves static
content?
If not (and I assume that it doesn't), I read the spec in a sense that
it is o.k. for the 304 response not to include an ETag.

For static content, last modified information usually is sufficient to
decide whether a cache entry is still valid, so what additional should
an ETag header deliver in that case?


Regards,
Matthias


 -Original Message-
 From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 18, 2007 3:10 AM
 To: Tomcat Users List
 Subject: Re: Missing ETag in 304 Header
 
 On 5/16/07, Joe Mun [EMAIL PROTECTED] wrote:
  Hi guys... so according to the HTTP 1.1 spec (
  http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), 
 304 Not Modified
  responses must include the ETag in the header.  However, 
 Tomcat doesn't seem
  to be adding it...
 
  I am serving a static text file, and the header only returns:
 
  HTTP/1.x 304 Not Modified
  Server: Apache-Coyote/1.1
  Date: Wed, etc...
 
 I examined the header returned by Tomcat 6.0.10 with Firefox's
 TamperData extension and also by uncommenting Tomcat's
 RequestDumperValve.
 
 You are right that the ETag header doesn't appear.
 
 However, I saw another cache related header if-none-match , which
 also shows a checksum in the same format as ETag , perhaps you may
 find that header useful.
 
 May 17, 2007 9:01:46 PM 
 org.apache.catalina.valves.RequestDumperValve invoke
 INFO: header=if-none-match=W/6958-1163795820656
 
 I don't really know what causes the ETag to appear, I would expect it
 to appear by default without any configuration similar to many other
 HTTP Caching Headers.
 
 I did notice the ETag for static files on one website that is hosted
 on Apache httpd + Tomcat.
 
  Is there a reason that the Etag is not being included?  Is 
 there a way to
  configure Tomcat to include this? My company is working 
 with a caching
  solution provider, and they are complaining about the missing ETag.
 
  thanks.
 
 
 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]



Re: Missing ETag in 304 Header

2007-05-18 Thread Len Popp

Tomcat DOES return ETag headers with static resources, and DOES NOT
return the ETag with 304 responses. That seems wrong according to the
quoted part of the spec.

Here are the headers from a couple of Firefox requests for the same
file. Note the first response is a 200 with an ETag, the second is a
304 without an ETag.
--
http://localhost:8080/tomcat.gif

GET /tomcat.gif HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: ShowOptions=1; loadDefault=Folder
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.x 200 OK
Server: Apache-Coyote/1.1
Etag: W/1934-1173108368046
Last-Modified: Mon, 05 Mar 2007 15:26:08 GMT
Content-Type: image/gif
Content-Length: 1934
Date: Fri, 18 May 2007 15:16:46 GMT
--
http://localhost:8080/tomcat.gif

GET /tomcat.gif HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: ShowOptions=1; loadDefault=Folder
If-Modified-Since: Mon, 05 Mar 2007 15:26:08 GMT
If-None-Match: W/1934-1173108368046
Cache-Control: max-age=0

HTTP/1.x 304 Not Modified
Server: Apache-Coyote/1.1
Date: Fri, 18 May 2007 15:16:46 GMT
--
--
Len

On 5/18/07, Reich, Matthias [EMAIL PROTECTED] wrote:

Hi,

the spec says that a 304 response MUST include header

- ETag and/or Content-Location, if the header would have been sent
in a 200 response to the same request

Does Tomcat send an ETag header in a 200 response when it serves static
content?
If not (and I assume that it doesn't), I read the spec in a sense that
it is o.k. for the 304 response not to include an ETag.

For static content, last modified information usually is sufficient to
decide whether a cache entry is still valid, so what additional should
an ETag header deliver in that case?


Regards,
Matthias


 -Original Message-
 From: Rashmi Rubdi [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 18, 2007 3:10 AM
 To: Tomcat Users List
 Subject: Re: Missing ETag in 304 Header

 On 5/16/07, Joe Mun [EMAIL PROTECTED] wrote:
  Hi guys... so according to the HTTP 1.1 spec (
  http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html),
 304 Not Modified
  responses must include the ETag in the header.  However,
 Tomcat doesn't seem
  to be adding it...
 
  I am serving a static text file, and the header only returns:
 
  HTTP/1.x 304 Not Modified
  Server: Apache-Coyote/1.1
  Date: Wed, etc...

 I examined the header returned by Tomcat 6.0.10 with Firefox's
 TamperData extension and also by uncommenting Tomcat's
 RequestDumperValve.

 You are right that the ETag header doesn't appear.

 However, I saw another cache related header if-none-match , which
 also shows a checksum in the same format as ETag , perhaps you may
 find that header useful.

 May 17, 2007 9:01:46 PM
 org.apache.catalina.valves.RequestDumperValve invoke
 INFO: header=if-none-match=W/6958-1163795820656

 I don't really know what causes the ETag to appear, I would expect it
 to appear by default without any configuration similar to many other
 HTTP Caching Headers.

 I did notice the ETag for static files on one website that is hosted
 on Apache httpd + Tomcat.

  Is there a reason that the Etag is not being included?  Is
 there a way to
  configure Tomcat to include this? My company is working
 with a caching
  solution provider, and they are complaining about the missing ETag.
 
  thanks.
 

 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]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Missing ETag in 304 Header

2007-05-17 Thread Rashmi Rubdi

On 5/16/07, Joe Mun [EMAIL PROTECTED] wrote:

Hi guys... so according to the HTTP 1.1 spec (
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), 304 Not Modified
responses must include the ETag in the header.  However, Tomcat doesn't seem
to be adding it...

I am serving a static text file, and the header only returns:

HTTP/1.x 304 Not Modified
Server: Apache-Coyote/1.1
Date: Wed, etc...


I examined the header returned by Tomcat 6.0.10 with Firefox's
TamperData extension and also by uncommenting Tomcat's
RequestDumperValve.

You are right that the ETag header doesn't appear.

However, I saw another cache related header if-none-match , which
also shows a checksum in the same format as ETag , perhaps you may
find that header useful.

May 17, 2007 9:01:46 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=if-none-match=W/6958-1163795820656

I don't really know what causes the ETag to appear, I would expect it
to appear by default without any configuration similar to many other
HTTP Caching Headers.

I did notice the ETag for static files on one website that is hosted
on Apache httpd + Tomcat.


Is there a reason that the Etag is not being included?  Is there a way to
configure Tomcat to include this? My company is working with a caching
solution provider, and they are complaining about the missing ETag.

thanks.



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]



Missing ETag in 304 Header

2007-05-16 Thread Joe Mun

Hi guys... so according to the HTTP 1.1 spec (
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), 304 Not Modified
responses must include the ETag in the header.  However, Tomcat doesn't seem
to be adding it...

I am serving a static text file, and the header only returns:

HTTP/1.x 304 Not Modified
Server: Apache-Coyote/1.1
Date: Wed, etc...

Is there a reason that the Etag is not being included?  Is there a way to
configure Tomcat to include this? My company is working with a caching
solution provider, and they are complaining about the missing ETag.

thanks.