From 6684c57e1632be26e6f0614a3efda2b2d4881441 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 12 Nov 2006 10:44:48 +0000 Subject: [PATCH] Set content type on error messages, and include a trailing newline --- includes/StreamFile.php | 4 +++- thumb.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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' ); -- 2.20.1