From 38fc83fb70a87f0f8a1b4bc0f4753e3063749522 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 2 Aug 2006 01:06:16 +0000 Subject: Fixed an issue in TAuthManager about authentication order. --- framework/Web/THttpResponse.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'framework/Web') diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php index 99d8daa5..b6b675c1 100644 --- a/framework/Web/THttpResponse.php +++ b/framework/Web/THttpResponse.php @@ -314,14 +314,15 @@ class THttpResponse extends TModule implements ITextWriter protected function sendContentTypeHeader() { $charset=$this->getCharset(); - if(empty($charset) && ($globalization=$this->getApplication()->getGlobalization(false))!==null) + if($charset==='' && ($globalization=$this->getApplication()->getGlobalization(false))!==null) $charset=$globalization->getCharset(); - - $contentType=empty($this->_contentType)?'text/html':$this->_contentType; - $charset=empty($charset)?'UTF-8':$charset; - - //default is "Content-Type: text/html;charset=UTF-8" - $this->appendHeader('Content-Type: '.$contentType.';charset='.$charset); + if($charset!=='') + { + $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'); } /** -- cgit v1.2.3