|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65596 - website/public_html/beta/common/code
From: dnljms_at_[hidden]
Date: 2010-09-26 08:48:23
Author: danieljames
Date: 2010-09-26 08:48:19 EDT (Sun, 26 Sep 2010)
New Revision: 65596
URL: http://svn.boost.org/trac/boost/changeset/65596
Log:
Fix the Content-type for html generated from text files.
Text files modified:
website/public_html/beta/common/code/boost_archive.php | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
Modified: website/public_html/beta/common/code/boost_archive.php
==============================================================================
--- website/public_html/beta/common/code/boost_archive.php (original)
+++ website/public_html/beta/common/code/boost_archive.php 2010-09-26 08:48:19 EDT (Sun, 26 Sep 2010)
@@ -105,16 +105,19 @@
// Handle ETags and Last-Modified HTTP headers.
- if (!http_headers($type, filemtime($check_file), $expires))
- return;
-
// Output raw files.
if($extractor == 'raw') {
+ if (!http_headers($type, filemtime($check_file), $expires))
+ return;
+
if($_SERVER['REQUEST_METHOD'] != 'HEAD')
display_raw_file($params, $type);
}
else {
+ if (!http_headers('text/html', filemtime($check_file), $expires))
+ return;
+
// Read file from hard drive or zipfile
// Note: this sets $params['content'] with either the content or an error
@@ -146,7 +149,7 @@
}
}
-// HTTP head handling
+// HTTP header handling
function http_headers($type, $last_modified, $expires = null)
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk