DWR

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

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.3, 2.0.4, 3.0.M1
  • Fix Version/s: 2.0.4, 3.0.RC1
  • Component/s: None
  • Description:
    Hide
    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.

    Show
    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

Hide
Joe Walker added a comment - 28/Mar/08 12:39 PM

Yuck - nasty code. Thanks.

Show
Joe Walker added a comment - 28/Mar/08 12:39 PM Yuck - nasty code. Thanks.

People

Dates

  • Created:
    25/Mar/08 5:24 PM
    Updated:
    28/Mar/08 12:39 PM
    Resolved:
    28/Mar/08 12:39 PM