} else {
list( $key, $val ) = array_map( 'trim', explode( ":", $string, 2 ) );
+ $key = strtoupper( $key );
+
if ( $replace || !isset( $this->headers[$key] ) ) {
$this->headers[$key] = $val;
}
}
/**
- * @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];
}