Parse duplicate-defaultsort error message
[lhc/web/wiklou.git] / includes / WebResponse.php
index d1f645c..0deae96 100644 (file)
@@ -116,6 +116,8 @@ class FauxResponse extends WebResponse {
                } else {
                        list( $key, $val ) = array_map( 'trim', explode( ":", $string, 2 ) );
 
+                       $key = strtoupper( $key );
+
                        if ( $replace || !isset( $this->headers[$key] ) ) {
                                $this->headers[$key] = $val;
                        }
@@ -127,10 +129,12 @@ class FauxResponse extends WebResponse {
        }
 
        /**
-        * @param $key string
+        * @param string $key The name of the header to get (case insensitive).
         * @return string
         */
        public function getheader( $key ) {
+               $key = strtoupper( $key );
+
                if ( isset( $this->headers[$key] ) ) {
                        return $this->headers[$key];
                }