Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2996

if-modified-since checking is not working in AbstractResource

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-M1
    • 1.5-M2.1
    • wicket
    • None

    Description

      In AbstractResource the if-modified-since header is not working correctly

      the servlet container seems not to deliver if-modified-since in milliseond precision

      so a if-modified-since timestamp like 1281787899123 will be cut off to 1281787899000.

      there was already a counter-measure in wicket-1.4 which seems to be missing in 1.5.

      wicket-1.4:

      WicketFilter, v 1.4.10, line 330ff:

      if (ifModifiedSince < (lastModified / 1000 * 1000))

      { // If the servlet mod time is later, call doGet() // Round down to the nearest second for a proper compare // A ifModifiedSince of -1 will always be less maybeSetLastModified(httpServletResponse, lastModified); doGet(httpServletRequest, httpServletResponse); }

      This kind of rounding ( / 1000 * 1000) is missing in 1.5 so the if-modified-since check eventually fails.

      Patch is included.

      Attachments

        1. fix-if-modified-since.patch
          0.9 kB
          Peter Ertl

        Activity

          People

            ivaynberg Igor Vaynberg
            pete Peter Ertl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: