From a3bf4e67e5c996b8f6abe987b22eae8cdcb32ea9 Mon Sep 17 00:00:00 2001 From: Lucas Werkmeister Date: Mon, 21 Jan 2019 12:46:36 +0100 Subject: [PATCH] Document header case in MWHttpRequest The lack of this documentation resulted in some confusion in T214032 and related tasks. Change-Id: I08fc201b625197614ef5e163ed3686638b630b13 --- includes/http/MWHttpRequest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php index 2cf532084c..19912394da 100644 --- a/includes/http/MWHttpRequest.php +++ b/includes/http/MWHttpRequest.php @@ -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 ) { -- 2.20.1