summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/THttpResponse.php8
2 files changed, 6 insertions, 3 deletions
diff --git a/HISTORY b/HISTORY
index 7c111a19..a9661786 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3,6 +3,7 @@ Version 3.0.1 June 1, 2006
BUG: Ticket#44 - THtmlArea (tiny_mce) not working on some systems (Qiang)
BUG: Ticket#167 - TSecurityManager issues warning when trying to encrypt/decrypt strings (Qiang)
BUG: Ticket#179 - CGI incompatibility causing clientscripts.php failure (Qiang)
+BUG: Ticket#181 - Unable to change Content-Type in response header if charset is not set (Qiang)
ENH: Ticket#150 - TDataGrid and TDataList now render table section tags (Qiang)
ENH: Ticket#152 - constituent parts of TWizard are exposed (Qiang)
ENH: added sanity check to calling event handlers (Qiang)
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');
}
/**