From aa99e1cdfc06d248f66f23d7765ccfb17b410bf8 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Sat, 28 Sep 2013 20:41:00 -0300 Subject: [PATCH] Add a header on thumb.php saying which thumb server on error. Only added if $wgShowHostnames is on. Adding the host name as a header makes it much easier when debugging with command line tools, since one often throws away the response body. This still keeps the host name in an html comment in the response body as well, like it was previously. Change-Id: I9d15bd5e2abb4e7a8d3fe2a17fc546a1c5f3b70f --- thumb.php | 1 + 1 file changed, 1 insertion(+) diff --git a/thumb.php b/thumb.php index 2cda3441f4..d2976f246b 100644 --- a/thumb.php +++ b/thumb.php @@ -387,6 +387,7 @@ function wfThumbError( $status, $msg ) { header( 'HTTP/1.1 500 Internal server error' ); } if ( $wgShowHostnames ) { + header( 'X-MW-Thumbnail-Renderer: ' . wfHostname() ); $url = htmlspecialchars( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' ); $hostname = htmlspecialchars( wfHostname() ); $debug = "\n\n"; -- 2.20.1