Bug 41666 - If-Unmodified-Since failure
Summary: If-Unmodified-Since failure
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.20
Hardware: All All
: P4 minor (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-21 01:44 UTC by Suzuki Yuichiro
Modified: 2007-02-25 20:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Suzuki Yuichiro 2007-02-21 01:44:28 UTC
The If-Unmodified-Since header doesn't work enoughly.

failed case:
 The If-Unmodified-Since header value: 1000000(milliseconds)
 The lastModified value of target resource: 1001000(milliseconds)

In this case, the response's status code should be SC_PRECONDITION_FAILED,
but the result is not so.

caused by:
In DefaultServlet#checkIfUnmodifiedSince:
    if ( lastModified > (headerValue + 1000)) {

I think it should be:
    if ( lastModified >= (headerValue + 1000)) {
Comment 1 Suzuki Yuichiro 2007-02-21 16:36:31 UTC
If-Modified-Since is also similar. 
Comment 2 Mark Thomas 2007-02-25 20:06:30 UTC
Fixed in svn. This will be included in 5.5.23 onwards.