MediaWiki REL1_37
|
Static Public Member Functions | |
static | handle ( $s, $phase) |
Standard output handler for use with ob_start. | |
Static Private Member Functions | |
static | emitContentLength ( $length) |
Set the Content-Length header if possible. | |
static | findUriExtension () |
Get the "file extension" that some client apps will estimate from the currently-requested URL. | |
static | handleGzip ( $s) |
Handler that compresses data with gzip if allowed by the Accept header. | |
static | mangleFlashPolicy ( $s) |
Mangle flash policy tags which open up the site to XSS attacks. | |
Definition at line 30 of file OutputHandler.php.
|
staticprivate |
Set the Content-Length header if possible.
This sets Content-Length for the following cases:
This assumes that HEAD requests are processed as GET requests by MediaWiki and that the webserver is tasked with stripping out the body.
Setting Content-Length can prevent clients from getting stuck waiting on PHP to finish while deferred updates are running.
int | $length |
Definition at line 212 of file OutputHandler.php.
References wfDebug().
|
staticprivate |
Get the "file extension" that some client apps will estimate from the currently-requested URL.
This isn't a WebRequest method, because we need it before the class loads.
Definition at line 104 of file OutputHandler.php.
References $path.
|
static |
Standard output handler for use with ob_start.
Output buffers using this method should only be started from MW_SETUP_CALLBACK, and only if there are no parent output buffers.
string | $s | Web response output |
int | $phase | Flags indicating the reason for the call |
Definition at line 41 of file OutputHandler.php.
References $s, $wgDisableOutputCompression, $wgMangleFlashPolicy, and MW_ENTRY_POINT.
|
staticprivate |
Handler that compresses data with gzip if allowed by the Accept header.
Unlike ob_gzhandler, it works for HEAD requests too. This assumes that the application processes them as normal GET request and that the webserver is tasked with stripping out the response body before sending the response the client.
string | $s | Web response output |
Definition at line 134 of file OutputHandler.php.
References $ext, $header, $s, wfClientAcceptsGzip(), and wfDebug().
|
staticprivate |
Mangle flash policy tags which open up the site to XSS attacks.
string | $s | Web response output |
Definition at line 188 of file OutputHandler.php.
References $s.