An issue came up on the Tomcat Users list about ETag headers and 304 responses. It seems (to me at least) there's a bug in Tomcat. Can someone tell me if my analysis is correct? I would appreciate input from developers who really know how this stuff is supposed to work.
The issue was originally raised by Joe Mun on the Tomcat Users list: http://marc.info/?l=tomcat-user&m=117934336727314&w=2 I looked at the behaviour in Tomcat 5.5.23 and it looks like Tomcat is not handling ETag headers as required by the HTTP spec, when it returns a 304 ("not modified") response for a file. For a 304 response, the 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" (RFC 2616 10.3.5) I take that to mean that if the server includes ETag headers when it sends files, it must also include them when it sends 304's for those same files. However Tomcat 5.5 doesn't do this. When a static file is requested, Tomcat includes the ETag when it sends the file (with 200 status code) but omits it if it sends a status 304 response. I did a simple test to verify this, requesting the same file twice to get first a 200 and then a 304 response from Tomcat. The headers, as reported by Firefox's Live HTTP Headers plugin, can be seen here: http://marc.info/?l=tomcat-user&m=117950251422474&w=2 Am I correct that this is incorrect behaviour? -- Len Popp [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]