dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ade296
)
Fix case insensitive string comparison for http header names
author
Sergio Santoro
<santoro.srg@gmail.com>
Sat, 2 Aug 2014 11:29:57 +0000
(13:29 +0200)
committer
Tim Starling
<tstarling@wikimedia.org>
Fri, 12 Dec 2014 02:38:43 +0000
(
02:38
+0000)
As of RFC 2616 sec 4.2, http header names are case insensitive.
Change-Id: Ib72df2572f5a9c825c5b3ad7735126f3687aad79
includes/OutputHandler.php
patch
|
blob
|
history
diff --git
a/includes/OutputHandler.php
b/includes/OutputHandler.php
index
b0bbcdd
..
c6209ee
100644
(file)
--- 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;
}