From: Mark A. Hershberger Date: Thu, 27 Oct 2011 17:58:30 +0000 (+0000) Subject: Fixes Bug #28277 by allowing redirects on the stream reader. Fixes a X-Git-Tag: 1.31.0-rc.0~26878 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=f1ff44d518a5ea6c0c63af6254e292e4d49395b2;p=lhc%2Fweb%2Fwiklou.git Fixes Bug #28277 by allowing redirects on the stream reader. Fixes a regression where pages specifying a w:en:Sprint would result in a url like http://pt.wikipedia.org/wiki/en:Special:Export/Sprint which, at least in 1.16, would mean the reader follow the redirect to http://en.wikipedia.org/wiki/Special:Export/Sprint. --- diff --git a/includes/Import.php b/includes/Import.php index 502b015b13..dfbd522f03 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -1518,7 +1518,7 @@ class ImportStreamSource { # quicker and sorts out user-agent problems which might # otherwise prevent importing from large sites, such # as the Wikimedia cluster, etc. - $data = Http::request( $method, $url ); + $data = Http::request( $method, $url, array( 'followRedirects' => true ) ); if( $data !== false ) { $file = tmpfile(); fwrite( $file, $data );