Followup r94881, r106948.
* Relative values of the "Location" header are incorrect as stated in RFC, however they do happen and modern browsers support them.
* This function loops backwards through all locations in order to build the proper absolute URI - Marooned at wikia-inc.com
*
+ * Note that the multiple Location: headers are an artifact of CURL -- they
+ * shouldn't actually get returned this way. Rewrite this when bug 29232 is
+ * taken care of (high-level redirect handling rewrite).
+ *
* @return string
*/
public function getFinalUrl() {
);
}
+ /**
+ * Warning:
+ *
+ * These tests are for code that makes use of an artifact of how CURL
+ * handles header reporting on redirect pages, and will need to be
+ * rewritten when bug 29232 is taken care of (high-level handling of
+ * HTTP redirects).
+ */
function testRelativeRedirections() {
$h = new MWHttpRequestTester( 'http://oldsite/file.ext' );
# Forge a Location header