BryanDavis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/278987

Change subject: Fix error handler endpoints
......................................................................

Fix error handler endpoints

Follow up to Ibf5cfc8 that fixes all of the error_page handler endpoints
to return a 200 status code.

Change-Id: I05c831feaa89c4a077a916c7a2911dd01e835689
---
M www/index.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/87/278987/1

diff --git a/www/index.php b/www/index.php
index 51f938e..2b252a1 100644
--- a/www/index.php
+++ b/www/index.php
@@ -98,7 +98,10 @@
        '503' => 'Service Unavailable',
 );
 if ( isset( $errorPages[$content] ) ) {
-       header( "HTTP/1.0 {$content} {$errorPages[$content]}" );
+       // Do not set proper HTTP status codes. These pages will be used as 
error
+       // handlers by nginx/apache and thus are expected to return 200 status 
to
+       // the calling server. The upstream server will handle putting the right
+       // status code on the page sent to the browser.
        include "content/{$content}.php";
        exit( 0 );
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/278987
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05c831feaa89c4a077a916c7a2911dd01e835689
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to