Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -378,11 +378,10 @@ |
379 | 379 | if ( $lag > $maxLag ) { |
380 | 380 | header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) ); |
381 | 381 | header( 'X-Database-Lag: ' . intval( $lag ) ); |
382 | | - // XXX: should we return a 503 HTTP error code like wfMaxlagError() does? |
383 | 382 | if( $wgShowHostnames ) { |
384 | | - $this->dieUsage( "Waiting for $host: $lag seconds lagged", 'maxlag' ); |
| 383 | + $this->dieUsage( "Waiting for $host: $lag seconds lagged", 'maxlag', 503 ); |
385 | 384 | } else { |
386 | | - $this->dieUsage( "Waiting for a database server: $lag seconds lagged", 'maxlag' ); |
| 385 | + $this->dieUsage( "Waiting for a database server: $lag seconds lagged", 'maxlag', 503 ); |
387 | 386 | } |
388 | 387 | return; |
389 | 388 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -225,6 +225,7 @@ |
226 | 226 | * (bug 18785) Add siprop=languages to meta=siteinfo |
227 | 227 | * (bug 14200) Added user and excludeuser parameters to list=watchlist and |
228 | 228 | list=recentchanges |
| 229 | +* Return HTTP 503 status code on maxlag error, like index.php does |
229 | 230 | |
230 | 231 | === Languages updated in 1.16 === |
231 | 232 | |