summaryrefslogtreecommitdiff
path: root/framework/Web/THttpResponse.php
diff options
context:
space:
mode:
authorxue <>2006-04-16 18:02:31 +0000
committerxue <>2006-04-16 18:02:31 +0000
commit9db90898be134c9f70c0b334ec071223e60ed76c (patch)
treec499036f6ca4b350b3f4ae48b0d55cf8308b385d /framework/Web/THttpResponse.php
parentfc38326ea80e73717fb1d187a16421f7bc1b1b04 (diff)
Merge from 3.0 branch till 924
Diffstat (limited to 'framework/Web/THttpResponse.php')
-rw-r--r--framework/Web/THttpResponse.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index d4a62cc6..f76218ca 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -69,7 +69,7 @@ class THttpResponse extends TModule implements ITextWriter
/**
* @var string character set, e.g. UTF-8
*/
- private $_charset;
+ private $_charset='';
/**
* Destructor.
@@ -285,10 +285,10 @@ class THttpResponse extends TModule implements ITextWriter
*/
protected function sendContentTypeHeader()
{
- $charset = $this->getCharset();
- if(empty($charset) && ($globalization=$this->getApplication()->getGlobalization())!==null)
- $charset = $globalization->getCharset();
- if(!empty($charset))
+ $charset=$this->getCharset();
+ if($charset==='' && ($globalization=$this->getApplication()->getGlobalization(false))!==null)
+ $charset=$globalization->getCharset();
+ if($charset==='')
{
$header='Content-Type: '.$this->getContentType().';charset='.$charset;
$this->appendHeader($header);