dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
poolcounter: PoolCounterRedis doc cleanups
[lhc/web/wiklou.git]
/
includes
/
OutputHandler.php
diff --git
a/includes/OutputHandler.php
b/includes/OutputHandler.php
index
c783fd3
..
c6209ee
100644
(file)
--- a/
includes/OutputHandler.php
+++ b/
includes/OutputHandler.php
@@
-28,8
+28,10
@@
* @return string
*/
function wfOutputHandler( $s ) {
* @return string
*/
function wfOutputHandler( $s ) {
- global $wgDisableOutputCompression, $wgValidateAllHtml;
- $s = wfMangleFlashPolicy( $s );
+ global $wgDisableOutputCompression, $wgValidateAllHtml, $wgMangleFlashPolicy;
+ if ( $wgMangleFlashPolicy ) {
+ $s = wfMangleFlashPolicy( $s );
+ }
if ( $wgValidateAllHtml ) {
$headers = headers_list();
$isHTML = false;
if ( $wgValidateAllHtml ) {
$headers = headers_list();
$isHTML = false;
@@
-127,7
+129,8
@@
function wfGzipHandler( $s ) {
$headers = headers_list();
$foundVary = false;
foreach ( $headers as $header ) {
$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;
}
$foundVary = true;
break;
}
@@
-164,7
+167,10
@@
function wfMangleFlashPolicy( $s ) {
* @param int $length
*/
function wfDoContentLength( $length ) {
* @param int $length
*/
function wfDoContentLength( $length ) {
- if ( !headers_sent() && isset( $_SERVER['SERVER_PROTOCOL'] ) && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' ) {
+ if ( !headers_sent()
+ && isset( $_SERVER['SERVER_PROTOCOL'] )
+ && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0'
+ ) {
header( "Content-Length: $length" );
}
}
header( "Content-Length: $length" );
}
}