Add comments explaining that the funky multiple Location headers stuff is a CURL...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 22 Dec 2011 23:12:44 +0000 (23:12 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 22 Dec 2011 23:12:44 +0000 (23:12 +0000)
Followup r94881, r106948.

includes/HttpFunctions.php
tests/phpunit/includes/HttpTest.php

index f25a806..f8e7b37 100644 (file)
@@ -591,6 +591,10 @@ class MWHttpRequest {
         * 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() {
index 07ccfa4..263383f 100644 (file)
@@ -124,6 +124,14 @@ class HttpTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * 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