X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=thumb.php;h=cf9bd2cdfeae0010ea89bb2e6baa59036dacff6e;hb=5074ec954b4ce3890a27562163d3a7a7c7bc3495;hp=43dd5d472fa34824054bc89a26535dd5ff133f2b;hpb=e5ef0fd0c6607dd34f6dee69d716b159662a0a34;p=lhc%2Fweb%2Fwiklou.git diff --git a/thumb.php b/thumb.php index 43dd5d472f..cf9bd2cdfe 100644 --- a/thumb.php +++ b/thumb.php @@ -409,6 +409,8 @@ function wfProxyThumbnailRequest( $img, $thumbName ) { // Send request to proxied service $status = $req->execute(); + MediaWiki\HeaderCallback::warnIfHeadersSent(); + // Simply serve the response from the proxied service as-is header( 'HTTP/1.1 ' . $req->getStatus() ); @@ -634,6 +636,8 @@ function wfThumbErrorText( $status, $msgText ) { function wfThumbError( $status, $msgHtml, $msgText = null, $context = [] ) { global $wgShowHostnames; + MediaWiki\HeaderCallback::warnIfHeadersSent(); + header( 'Cache-Control: no-cache' ); header( 'Content-Type: text/html; charset=utf-8' ); if ( $status == 400 || $status == 404 || $status == 429 ) {