From d01b5bc95cfdd4b2dc0e504ca3ed7f19a5c1ccb6 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 1 Jun 2015 15:02:50 +0100 Subject: [PATCH] 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 --- includes/exception/MWException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); -- 2.20.1