From: Timo Tijhof Date: Mon, 1 Jun 2015 14:02:50 +0000 (+0100) Subject: exception: Use standard message for HTTP status 500 X-Git-Tag: 1.31.0-rc.0~11200 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=d01b5bc95cfdd4b2dc0e504ca3ed7f19a5c1ccb6;p=lhc%2Fweb%2Fwiklou.git exception: Use standard message for HTTP status 500 This is the only case in the MediaWiki code base where a custom message is used. Supporting in the standard HttpStatus library would require a $customMessage parameter which seems unnecessary. Additional information should be communicated using additional HTTP response headers or inside the body content. Besides, in current PHP versions and in Apache 2.4, the message is already being ignored and replaced with the standard message (see T100984). Bug: T100984 Change-Id: I11b58a2f3ce22568479d36027d15e5c6f428ff15 --- diff --git a/includes/exception/MWException.php b/includes/exception/MWException.php index 478fead16c..e54e56852e 100644 --- a/includes/exception/MWException.php +++ b/includes/exception/MWException.php @@ -238,8 +238,8 @@ class MWException extends Exception { } elseif ( self::isCommandLine() ) { MWExceptionHandler::printError( $this->getText() ); } else { - self::header( 'HTTP/1.1 500 MediaWiki exception' ); - self::header( 'Status: 500 MediaWiki exception' ); + self::header( 'HTTP/1.1 500 Internal Server Error' ); + self::header( 'Status: 500 Internal Server Error' ); self::header( "Content-Type: $wgMimeType; charset=utf-8" ); $this->reportHTML();