* (bug 29154) Allow upload-by-URL to follow HTTP redirects
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 22 Sep 2011 01:15:06 +0000 (01:15 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 22 Sep 2011 01:15:06 +0000 (01:15 +0000)
includes/upload/UploadFromUrl.php

index f9abffe..a7aa30b 100644 (file)
@@ -148,7 +148,9 @@ class UploadFromUrl extends UploadBase {
                $this->mRemoveTempFile = true;
                $this->mFileSize = 0;
 
-               $req = MWHttpRequest::factory( $this->mUrl );
+               $req = MWHttpRequest::factory( $this->mUrl, array(
+                       'followRedirects' => true
+               ) );
                $req->setCallback( array( $this, 'saveTempFileChunk' ) );
                $status = $req->execute();