Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39178

Access servlet does not support Last-Modified or If-Modified-Since HTTP headers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.3
    • Fix Version/s: 10.4
    • Component/s: Kernel
    • Labels:
      None
    • Environment:
      Linux, mysql
    • 10 status:
      Resolved
    • Previous Issue Keys:
      SAK-3916, KNL-1316
    • Test Plan:
      Hide

      Here's probably the easiest way to test this:

      • Login as admin, go into the admin workspace resources Public folder
      • Upload a file (like a jpeg) into the public folder
      • After this you may need to click on Action->Edit Details of the Public folder so that HTML files are allowed, otherwise it can be hard to capture the headers
      • Click on the file, as an image it should open up in a new page, open up the javascript or Firebug console and look at the Network tab.
      • It should show the headers mentioned here (Last-Modified, If-Modified-Since) and refreshing on the image should return a 304. Previously it would return a 200 for each request and re-download the resource.
      Show
      Here's probably the easiest way to test this: Login as admin, go into the admin workspace resources Public folder Upload a file (like a jpeg) into the public folder After this you may need to click on Action->Edit Details of the Public folder so that HTML files are allowed, otherwise it can be hard to capture the headers Click on the file, as an image it should open up in a new page, open up the javascript or Firebug console and look at the Network tab. It should show the headers mentioned here (Last-Modified, If-Modified-Since) and refreshing on the image should return a 304. Previously it would return a 200 for each request and re-download the resource.

      Description

      The access/content servlet for Resources does not output the Last-Modified HTTP header, or take account of If-Modified-Since headers in GET requests.

      This is significant because the lack of this support means that browsers or intermediate caches will always be sent a complete copy of the file, rather than returning an HTTP 304 (not modified) response if the file has already been cached.

      This increases response times and thus delay perceived by users, and increases bandwidth use.

      As the access serverlet is returning an HTTP protocol response of "HTTP/1.1", it is required to support If-Modified-Since, and this is therefore also a protocol violation.

        Gliffy Diagrams

          Zeplin

            Attachments

            1. 1316 - headers set.PNG
              1316 - headers set.PNG
              55 kB
            2. 1316 - not modified.PNG
              1316 - not modified.PNG
              5 kB
            3. KNL-1316.patch
              3 kB
            4. KNL-1316.patch
              4 kB

              Issue Links

                Activity

                  People

                  Assignee:
                  ottenhoff Sam Ottenhoff
                  Reporter:
                  smarquard Stephen Marquard
                  Votes:
                  1 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration