Moodle
  1. Moodle
  2. MDL-26294

send_file() not functional with content ranges

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Libraries
    • Labels:
      None
    • Environment:
      Linux
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      16383

      Description

      send_file() in lib/filelib.php when using content-ranges attempts to open the file except uses $filename instead of $path

      current:
      $handle = fopen($filename, 'rb');
      byteserving_send_file($handle, $mimetype, $ranges, $filesize);

      fix:
      $handle = fopen($path, 'rb');
      byteserving_send_file($handle, $mimetype, $ranges, $filesize);

        Activity

        Hide
        Petr Škoda added a comment -

        Thanks a lot for the report and patch!
        Fix should be in the next weekly build.

        Petr

        Show
        Petr Škoda added a comment - Thanks a lot for the report and patch! Fix should be in the next weekly build. Petr

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: