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

Support http HEAD requests for pluginfile

    XMLWordPrintable

    Details

      Description

      Often when a browser converts from a full download to an incremental download using range requests (ie for streaming audio / video) it will first request a HEAD to get the content length.

      Moodle doesn't handle this itself in any way so it will just serve the whole file normally and then apache or nginx will throw away the entire response and convert it to a head request just to grab the content length.

      If you use xsend file then it's probably smart enough to figure this out, but when you use the new alternate filesystem api it will first stream the file from elsewhere (eg objectfs -> aws s3) and then throw it away. This could be a massive video file. But we know the content length from the mdl_files, we should be able to blindly send this without touching the real file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                brendanheywood Brendan Heywood
                Participants:
                Component watchers:
                Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Ryan Wyllie, Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: