From 58a41965bfff179cf4860bb94c9124007ff86923 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 22 Apr 2007 22:01:41 +0000 Subject: [PATCH] 503 response code on lag error --- includes/Wiki.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 51a88693fa..0080c6766f 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -60,7 +60,8 @@ class MediaWiki { global $wgLoadBalancer; list( $host, $lag ) = $wgLoadBalancer->getMaxLag(); if ( $lag > $maxLag ) { - header( 'HTTP/1.1 500 Internal server error' ); + header( 'HTTP/1.1 503 Service Unavailable' ); + header( 'Retry-After: ' . max( intval( $maxLag ), 5 ); header( 'Content-Type: text/plain' ); echo "Waiting for $host: $lag seconds lagged\n"; return false; -- 2.20.1