summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorxue <>2006-05-18 21:23:54 +0000
committerxue <>2006-05-18 21:23:54 +0000
commitf29ab3f83f5a368c0d0f2885ff77fdbb93246b63 (patch)
treefa269ff58c4edc03f1c885787dce7a331149410c /framework/Web
parent71a9120b8fc9f8771b603d195128a623b02a6554 (diff)
Fixed #181.
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/THttpResponse.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index 582a3db3..5a3ff99d 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -65,7 +65,7 @@ class THttpResponse extends TModule implements ITextWriter
/**
* @var string content type
*/
- private $_contentType='text/html';
+ private $_contentType=null;
/**
* @var string character set, e.g. UTF-8
*/
@@ -315,9 +315,11 @@ class THttpResponse extends TModule implements ITextWriter
$charset=$globalization->getCharset();
if($charset!=='')
{
- $header='Content-Type: '.$this->getContentType().';charset='.$charset;
- $this->appendHeader($header);
+ $contentType=$this->_contentType===null?'text/html':$this->_contentType;
+ $this->appendHeader('Content-Type: '.$contentType.';charset='.$charset);
}
+ else if($this->_contentType!==null)
+ $this->appendHeader('Content-Type: '.$this->_contentType.';charset=UTF-8');
}
/**