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

send_file() not functional with content ranges

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

      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);

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            skodak Petr Skoda added a comment -

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

            Petr

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

              People

              • Assignee:
                skodak Petr Skoda
                Reporter:
                james.mitchell James Mitchell
                Tester:
                Eloy Lafuente (stronk7)
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11