From: Tim Starling Date: Sun, 12 Nov 2006 10:44:48 +0000 (+0000) Subject: Set content type on error messages, and include a trailing newline X-Git-Tag: 1.31.0-rc.0~55214 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=6684c57e1632be26e6f0614a3efda2b2d4881441;p=lhc%2Fweb%2Fwiklou.git Set content type on error messages, and include a trailing newline --- diff --git a/includes/StreamFile.php b/includes/StreamFile.php index 6f0f6b5698..6418269862 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -7,13 +7,15 @@ function wfStreamFile( $fname ) { if ( !$stat ) { header( 'HTTP/1.0 404 Not Found' ); header( 'Cache-Control: no-cache' ); + header( 'Content-Type: text/html' ); $encFile = htmlspecialchars( $fname ); $encScript = htmlspecialchars( $_SERVER['SCRIPT_NAME'] ); echo "

File not found

Although this PHP script ($encScript) exists, the file requested for output ($encFile) does not.

-"; + +"; return; } diff --git a/thumb.php b/thumb.php index 9f7ed88627..c325d07a71 100644 --- a/thumb.php +++ b/thumb.php @@ -74,12 +74,14 @@ if ( $thumb && $thumb->path ) { $badtitle = wfMsg( 'badtitle' ); $badtitletext = wfMsg( 'badtitletext' ); header( 'Cache-Control: no-cache' ); + header( 'Content-Type: text/html' ); echo " $badtitle

$badtitle

$badtitletext

-"; + +"; } wfProfileOut( 'thumb.php-render' );