Document header case in MWHttpRequest
authorLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Mon, 21 Jan 2019 11:46:36 +0000 (12:46 +0100)
committerLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Mon, 21 Jan 2019 11:46:36 +0000 (12:46 +0100)
The lack of this documentation resulted in some confusion in T214032 and
related tasks.

Change-Id: I08fc201b625197614ef5e163ed3686638b630b13

includes/http/MWHttpRequest.php

index 2cf5320..1991239 100644 (file)
@@ -466,6 +466,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
         * request has been executed.  Because some headers
         * (e.g. Set-Cookie) can appear more than once the, each value of
         * the associative array is an array of the values given.
+        * Header names are always in lowercase.
         *
         * @return array
         */
@@ -480,7 +481,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
        /**
         * Returns the value of the given response header.
         *
-        * @param string $header
+        * @param string $header case-insensitive
         * @return string|null
         */
        public function getResponseHeader( $header ) {