diff options
author | xue <> | 2006-05-18 21:26:25 +0000 |
---|---|---|
committer | xue <> | 2006-05-18 21:26:25 +0000 |
commit | 1cd5380675aab9a2884845b6630091be2e857f69 (patch) | |
tree | 31b4a1c97b769cb1505b1ec0706fe3f2dee9e715 /framework/Web | |
parent | 4945d1fb9856d92ab4dd9a0f65a11928f65f9b28 (diff) |
Merge from 3.0 branch till 1082.
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/THttpResponse.php | 8 |
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');
}
/**
|