Last modified: 2012-04-16 09:15:51 UTC
When using suPHP and visiting a non existent entry it generates a malformed header error because its defining HTTP/1.x The exact error is, malformed header from script. Bad header=HTTP/1.x 404 Not Found: index.php The offending line is includes/Article.php $wgRequest->response()->header( "HTTP/1.x 404 Not Found" ); This should be $wgRequest->response()->header( "HTTP/1.1 404 Not Found" ); The same also applies to includes/WebStart.php Which has the same problem when defining an 500, Internal Server Error. Here is the diff to fix the problem, diff -Naur mediawiki-1.16.2-original/includes/Article.php mediawiki-1.16.2/includes/Article.php --- mediawiki-1.16.2-original/includes/Article.php 2011-01-04 06:15:54.000000000 +0000 +++ mediawiki-1.16.2/includes/Article.php 2011-03-24 03:11:42.000000000 +0000 @@ -1278,7 +1278,7 @@ 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 -Naur mediawiki-1.16.2-original/includes/WebStart.php mediawiki-1.16.2/includes/WebStart.php --- mediawiki-1.16.2-original/includes/WebStart.php 2009-05-07 19:30:26.000000000 +0100 +++ mediawiki-1.16.2/includes/WebStart.php 2011-03-24 03:11:50.000000000 +0000 @@ -30,7 +30,7 @@ ); 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 ); }
I always thought the x got magically replaced with the relevant version number.
I have never seen it defined as 1.x, looking at other parts of the system it also defines 1.1. Those 2 locations seem to be the only ones which define as 1.x
Fixed in r84729