Fixes Bug #28214 - When page not found, sends malformed HTTP/1.x instead of HTTP/1.1 in header of respons

Note that there are a few places in the source where headers are sent
with HTTP/1.0 instead of HTTP/1.1 but this patch doesa not address those
This commit is contained in:
Mark A. Hershberger 2011-03-25 03:36:18 +00:00
parent c5a80bfb66
commit 289c1d7771
3 changed files with 3 additions and 3 deletions

View file

@ -1404,7 +1404,7 @@ class Article {
if ( !$this->hasViewableContent() ) {
// If there's no backing content, send a 404 Not Found
// for better machine handling of broken links.
$wgRequest->response()->header( "HTTP/1.x 404 Not Found" );
$wgRequest->response()->header( "HTTP/1.1 404 Not Found" );
}
$wgOut->addWikiText( $text );

View file

@ -520,7 +520,7 @@ EOT
if ( !$this->getID() ) {
// If there is no image, no shared image, and no description page,
// output a 404, to be consistent with articles.
$wgRequest->response()->header( "HTTP/1.x 404 Not Found" );
$wgRequest->response()->header( "HTTP/1.1 404 Not Found" );
}
}
}

View file

@ -34,7 +34,7 @@ if ( ini_get( 'register_globals' ) ) {
);
foreach ( $_REQUEST as $name => $value ) {
if( in_array( $name, $verboten ) ) {
header( "HTTP/1.x 500 Internal Server Error" );
header( "HTTP/1.1 500 Internal Server Error" );
echo "register_globals security paranoia: trying to overwrite superglobals, aborting.";
die( -1 );
}