Simultaneous handling of If-Modified-Since and If-None-Match is broken

Description

In FileHandler / CachingFileHandler:
if (givenEtag == null) {
if (modifiedSince > CONTAINER_START_TIME) {
log.debug("Sending 304

Which is almost good, ">=" should be used.

but if both headers are present:

if (ETAG.equals(givenEtag) && modifiedSince < CONTAINER_START_TIME) {
log.debug("Sending 304

Using "<" here contradicts the behaviour above.

Test log:
Sending content for /engine.js, If-Modified-Since=1206465144000, Container Start=1206465144000, Old ETag="1206465144000", New ETag="1206465144000"

This should have been a sending 304 instead in that case.

Activity

Show:
Joe Walker
March 28, 2008, 12:39 PM

Yuck - nasty code. Thanks.

Assignee

Joe Walker

Reporter

Damien B

Labels

None

Documentation Required

None

Fix versions

Affects versions

Priority

Major
Configure