Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -551,10 +551,11 @@ |
552 | 552 | list( $host, $lag ) = $lb->getMaxLag(); |
553 | 553 | if ( $lag > $maxLag ) { |
554 | 554 | if ( $abort ) { |
555 | | - header( 'HTTP/1.1 503 Service Unavailable' ); |
556 | | - header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) ); |
557 | | - header( 'X-Database-Lag: ' . intval( $lag ) ); |
558 | | - header( 'Content-Type: text/plain' ); |
| 555 | + $resp = $this->context->getRequest()->response(); |
| 556 | + $resp->header( 'HTTP/1.1 503 Service Unavailable' ); |
| 557 | + $resp->header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) ); |
| 558 | + $resp->header( 'X-Database-Lag: ' . intval( $lag ) ); |
| 559 | + $resp->header( 'Content-Type: text/plain' ); |
559 | 560 | if( $wgShowHostnames ) { |
560 | 561 | echo "Waiting for $host: $lag seconds lagged\n"; |
561 | 562 | } else { |