DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42497>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42497

           Summary: 304 response should consistently include ETag header
           Product: Tomcat 5
           Version: 5.5.23
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


According to the HTTP spec, if a server includes an ETag header when it sends a
file, it must also include the ETag when it sends a 304 (not-modified) response
for that file. Tomcat does not do this for static files - if you request a
static file and get a 200 response, the response has an ETag header; but if you
get a 304 resopnse, the ETag is omitted.

To reproduce:
- In a browser, request a static file from Tomcat (e.g. 
http://localhost/tomcat.gif)
- Make sure you get a 200 response (force reload or clear browser cache)
- Examine the response headers (using a browser plugin or whatever) - note that
there is an ETag header
- Request the same file again, getting a 304 (not-modified) response from Tomcat
- Examine the response headers - note there is no ETag
The 304 response should include an ETag header, because the 200 response had 
one.

Spec reference: RFC 2616 section 10.3.5 says:
"304 Not Modified
[...]
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"

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to