MediaWiki  REL1_19
OutputHandler.php File Reference

Functions to be used with PHP's output buffer. More...

Go to the source code of this file.

Functions

 wfDoContentLength ($length)
 Add a Content-Length header if possible.
 wfGzipHandler ($s)
 Handler that compresses data with gzip if allowed by the Accept header.
 wfHtmlValidationHandler ($s)
 Replace the output with an error if the HTML is not valid.
 wfMangleFlashPolicy ($s)
 Mangle flash policy tags which open up the site to XSS attacks.
 wfOutputHandler ($s)
 Standard output handler for use with ob_start.
 wfRequestExtension ()
 Get the "file extension" that some client apps will estimate from the currently-requested URL.

Detailed Description

Functions to be used with PHP's output buffer.

Definition in file OutputHandler.php.


Function Documentation

wfDoContentLength ( length)

Add a Content-Length header if possible.

This makes it cooperate with squid better.

Parameters:
$lengthint

Definition at line 137 of file OutputHandler.php.

Referenced by wfOutputHandler().

Here is the caller graph for this function:

wfGzipHandler ( s)

Handler that compresses data with gzip if allowed by the Accept header.

Unlike ob_gzhandler, it works for HEAD requests too.

Parameters:
$sstring
Returns:
string

Definition at line 78 of file OutputHandler.php.

References $ext, $wgUseXVO, wfClientAcceptsGzip(), and wfRequestExtension().

Referenced by wfOutputHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

Replace the output with an error if the HTML is not valid.

Parameters:
$sstring
Returns:
string

Definition at line 150 of file OutputHandler.php.

References $out, and MWTidy\checkErrors().

Referenced by wfOutputHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

Mangle flash policy tags which open up the site to XSS attacks.

Parameters:
$sstring
Returns:
string

Definition at line 123 of file OutputHandler.php.

Referenced by wfOutputHandler().

Here is the caller graph for this function:

wfOutputHandler ( s)

Standard output handler for use with ob_start.

Parameters:
$sstring
Returns:
string

Definition at line 15 of file OutputHandler.php.

References $wgDisableOutputCompression, $wgValidateAllHtml, wfDoContentLength(), wfGzipHandler(), wfHtmlValidationHandler(), and wfMangleFlashPolicy().

Here is the call graph for this function:

Get the "file extension" that some client apps will estimate from the currently-requested URL.

This isn't on WebRequest because we need it when things aren't initialized

Access:
private
Returns:
string

Definition at line 50 of file OutputHandler.php.

References $path.

Referenced by wfGzipHandler().

Here is the caller graph for this function: