summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-03-17 20:11:21 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-03-17 20:11:21 +0000
commit4d3d00ade282e27b765a64c86f6607f1a92af2c0 (patch)
tree8d2bcb843c408552a870db4116fd7986db5ebb43 /src
parentdb7a46b23530724cf1a8d356de3ac4f1fe0d5ac7 (diff)
downloadsemanticscuttle-4d3d00ade282e27b765a64c86f6607f1a92af2c0.tar.gz
semanticscuttle-4d3d00ade282e27b765a64c86f6607f1a92af2c0.tar.bz2
Fix bug #2960663: do not send content-type headers twice for ajax/api scripts
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@690 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src')
-rw-r--r--src/SemanticScuttle/header.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php
index 12c1f72..ef36e83 100644
--- a/src/SemanticScuttle/header.php
+++ b/src/SemanticScuttle/header.php
@@ -107,6 +107,12 @@ $tplVars['userservice'] = $userservice;
// 6 // Force UTF-8 behaviour for server (cannot be moved into top.inc.php which is not included into every file)
if (!defined('UNIT_TEST_MODE')) {
- header('Content-Type: text/html; charset=utf-8');
+ //API files define that, so we need a way to support both of them
+ if (!isset($httpContentType)) {
+ $httpContentType = 'text/html';
+ }
+ if ($httpContentType !== false) {
+ header('Content-Type: ' . $httpContentType . '; charset=utf-8');
+ }
}
?>