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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.7
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Files API
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w22_MDL-39688_m26_etag

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13