From 6b683ea40e18b3abb09235934952b76b3ed159b2 Mon Sep 17 00:00:00 2001 From: Sergio Santoro Date: Fri, 23 May 2014 00:17:23 +0200 Subject: [PATCH] MediaWiki::performAction, return 404 on nosuchaction error Nosuchaction error page was sending 200 as the HTTP status code, which was misleading. Instead return 404. Change-Id: I9b432c9e53caf0a13e9a0c798f78a7bd8a78443b --- includes/Wiki.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/Wiki.php b/includes/Wiki.php index eff251f6d6..555813d169 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -434,6 +434,7 @@ class MediaWiki { } if ( wfRunHooks( 'UnknownAction', array( $request->getVal( 'action', 'view' ), $page ) ) ) { + $output->setStatusCode( 404 ); $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); } -- 2.20.1