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

URL downloader does not follow redirects

    Details

    • Testing Instructions:
      Hide

      1. Add a new File resource.
      2. In the Content Section, click on "Add..."
      3. In the file picker, select "URL downloader"
      4. Type google.com in the URL box and click Download.

      You should see at least one image available for download.

      Show
      1. Add a new File resource. 2. In the Content Section, click on "Add..." 3. In the file picker, select "URL downloader" 4. Type google.com in the URL box and click Download. You should see at least one image available for download.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-33749-master

      Description

      When adding a resource such as a file to a course, using the URL downloader in the File picker dialog fails when a website is entered that redirects the user.

      Steps to reproduce:
      1. Add a new File resource.
      2. In the Content Section, click on "Add..."
      3. In the file picker, select "URL downloader"
      4. Type google.com in the URL box and click Download.

      This is what comes up when following these steps:
      HTTP/1.1 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Thu, 14 Jun 2012 18:23:40 GMT Expires: Sat, 14 Jul 2012 18:23:40 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 219 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN

      Note that typing www.google.com into the URL box does work. Google automatically redirects users from http://google.com to http://www.google.com, which the URL downloader cannot handle.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12