From: Sergio Santoro Date: Sat, 2 Aug 2014 11:29:57 +0000 (+0200) Subject: Fix case insensitive string comparison for http header names X-Git-Tag: 1.31.0-rc.0~12993 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=3de9803c06b70b270c0963aad70ed02731036536;p=lhc%2Fweb%2Fwiklou.git Fix case insensitive string comparison for http header names As of RFC 2616 sec 4.2, http header names are case insensitive. Change-Id: Ib72df2572f5a9c825c5b3ad7735126f3687aad79 --- diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index b0bbcddbd3..c6209eebcf 100644 --- a/includes/OutputHandler.php +++ b/includes/OutputHandler.php @@ -129,7 +129,8 @@ function wfGzipHandler( $s ) { $headers = headers_list(); $foundVary = false; foreach ( $headers as $header ) { - if ( substr( $header, 0, 5 ) == 'Vary:' ) { + $headerName = strtolower( substr( $header, 0, 5 ) ); + if ( $headerName == 'vary:' ) { $foundVary = true; break; }