+ /**
+ * Get a response header
+ * @param string $key The name of the header to get (case insensitive).
+ * @return string|null The header value (if set); null otherwise.
+ * @since 1.25
+ */
+ public function getHeader( $key ) {
+ foreach ( headers_list() as $header ) {
+ list( $name, $val ) = explode( ':', $header, 2 );
+ if ( !strcasecmp( $name, $key ) ) {
+ return trim( $val );
+ }
+ }
+ return null;
+ }
+