From: Mark A. Hershberger Date: Fri, 25 Mar 2011 03:36:18 +0000 (+0000) Subject: Fixes Bug #28214 - When page not found, sends malformed HTTP/1.x instead of HTTP... X-Git-Tag: 1.31.0-rc.0~31200 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=289c1d7771858fb98b2c10907a65f4bca4cd03c5;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/Article.php b/includes/Article.php index 3df5066610..53334b5db8 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ); diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 0bbf58b797..ba544b9f08 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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" ); } } } diff --git a/includes/WebStart.php b/includes/WebStart.php index 27670ad086..2c21cdb2db 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -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 ); }