Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39688

X-Sendfile with byte-served content breaks when ETag header is added

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.7
    • 2.3.8, 2.4.5, 2.5.1
    • Files API
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • w22_MDL-39688_m26_etag
    • Hide

      You will need to rerun each test multiple times with:

      • debug_developer disabled
      • your browser cache enabled

      The first time that you run the test, it should seed the file to cache. On subsequent times, the file should be picked up from the cache.

      1/ test normal file sending - for example resource activity files, there should be Etag header
      2/ test byteserving - for example resource with large PDF in Adobe viewer, the Etag should not be in range requests
      3/ repeat the tests with and without xsendfile multiple times.

      Show
      You will need to rerun each test multiple times with: debug_developer disabled your browser cache enabled The first time that you run the test, it should seed the file to cache. On subsequent times, the file should be picked up from the cache. 1/ test normal file sending - for example resource activity files, there should be Etag header 2/ test byteserving - for example resource with large PDF in Adobe viewer, the Etag should not be in range requests 3/ repeat the tests with and without xsendfile multiple times.

    Description

      I've just been investigating an issue whereby MP4 content served using X-Accel-Redirect/X-Sendfile is being served using Byte Ranges, but the partial content is cached by the browser.

      It appears that the ETag header is still added, and so the browser is caching some of the content, but not all of it. On subsequent attempts to view the same content, the incorrect partial range is returned and it fails to play.

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda
              dobedobedoh Andrew Lyons
              Dan Poltawski Dan Poltawski
              Sam Hemelryk Sam Hemelryk
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Jul/13