r101010 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101009‎ | r101010 | r101011 >
Date:17:58, 27 October 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/Import.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Import.php
@@ -1518,7 +1518,7 @@
15191519 # quicker and sorts out user-agent problems which might
15201520 # otherwise prevent importing from large sites, such
15211521 # as the Wikimedia cluster, etc.
1522 - $data = Http::request( $method, $url );
 1522+ $data = Http::request( $method, $url, array( 'followRedirects' => true ) );
15231523 if( $data !== false ) {
15241524 $file = tmpfile();
15251525 fwrite( $file, $data );

Sign-offs

UserFlagDate
He7d3rtested19:05, 27 October 2011
Nikerabbitinspected06:29, 28 October 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r1011261.18wmf1: MFT r98669, r99164, r99321, r99332, r99632, r99897, r99914, r99952,...catrope12:09, 28 October 2011
r101203REL1_18 MFT r99286, r99332, r100398, r100701, r101010reedy21:20, 28 October 2011

Comments

#Comment by He7d3r (talk | contribs)   19:04, 27 October 2011

Now it works for me on MW 1.18. Maybe this should be tagged appropriately for backporting?

#Comment by MarkAHershberger (talk | contribs)   20:31, 27 October 2011

trivial backport is trivial

#Comment by Catrope (talk | contribs)   11:30, 28 October 2011

Retagging 1.18, was never backported AFAICT.

Status & tagging log