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

Corrupt zip file when using Intener Explorer

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.9.8
    • Fix Version/s: None
    • Component/s: Files API
    • Labels:
      None
    • Environment:
      Linux centos 5, postgres 8.1, apache 2.2.3, php 5.1.6
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      I have a zip file which will be downloaded in many courses in my site, so i put this file in "Site Files" and added a new resource, with a link of this file, in the courses. When i download using IE this file is corrupted, but when download with FF the file is OK

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            skodak Petr Skoda added a comment -

            Hello,
            this is most probably caused by server configuration or invalid characters at the end of some files. First check there are no extra whitespace chars at the end of your config.php file. Then make a binary comparison of the zip file before and after the download.

            Please use moodle.org support forums if you need more help. Thanks

            Petr Skoda

            Show
            skodak Petr Skoda added a comment - Hello, this is most probably caused by server configuration or invalid characters at the end of some files. First check there are no extra whitespace chars at the end of your config.php file. Then make a binary comparison of the zip file before and after the download. Please use moodle.org support forums if you need more help. Thanks Petr Skoda
            Hide
            bozohrj Carlos Alexandre S. da Fonseca added a comment -

            The configurations are ok , and the servers files are ok too (i use md5sum for it).

            But i found a workaround, i put "?forcedownload=true" in the end of the link and IE downloaded the file correctly.

            Show
            bozohrj Carlos Alexandre S. da Fonseca added a comment - The configurations are ok , and the servers files are ok too (i use md5sum for it). But i found a workaround, i put "?forcedownload=true" in the end of the link and IE downloaded the file correctly.
            Hide
            svidusov Sergey Vidusov added a comment -

            I guess my problem is related to the same issue.

            When you try to download backup zip files in IE 8, a browser window pops up (containing nothing), then dialog window comes up asking to open/save the file. But nothing happens either I choose open or save - the download process just stalls. If right-click the link and choose "Save As" option, the zip file downloads successfully. But inside it contains a single file without extension, named after the backup file. If I append ".zip" to the end of it and unpack the file, everything goes okay.

            On the other hand, if I add "?forcedownload=1" to the link (e.g., "http://server/file.php/..../filename.zip?forcedownload=1), I get a valid zip file where everything's in its place.

            I would suggest that this behavior is caused by "Content-Disposition: inline" header, which I regard as pretty useless in case of zip files (and in case of all other types, if you ask me).

            As a solution I would suggest to set $forcedownload to true for all zip files coming through file.php.

            Show
            svidusov Sergey Vidusov added a comment - I guess my problem is related to the same issue. When you try to download backup zip files in IE 8, a browser window pops up (containing nothing), then dialog window comes up asking to open/save the file. But nothing happens either I choose open or save - the download process just stalls. If right-click the link and choose "Save As" option, the zip file downloads successfully. But inside it contains a single file without extension, named after the backup file. If I append ".zip" to the end of it and unpack the file, everything goes okay. On the other hand, if I add "?forcedownload=1" to the link (e.g., "http://server/file.php/..../filename.zip?forcedownload=1), I get a valid zip file where everything's in its place. I would suggest that this behavior is caused by "Content-Disposition: inline" header, which I regard as pretty useless in case of zip files (and in case of all other types, if you ask me). As a solution I would suggest to set $forcedownload to true for all zip files coming through file.php.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: