summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-04-18 13:18:53 +0000
committerxue <>2006-04-18 13:18:53 +0000
commit0beaf0e5126c537712372638b9b0902a8ef63472 (patch)
tree9eaf4d63225b5907f62dadfb40fa261660ed5ca2 /framework
parent4dba56d6709d495c8ded0b8e4fa2d6fdaa225cc0 (diff)
Fixed a bug in sending headers when charset is set.
Diffstat (limited to 'framework')
-rw-r--r--framework/Util/TLogRouter.php4
-rw-r--r--framework/Web/THttpResponse.php2
2 files changed, 1 insertions, 5 deletions
diff --git a/framework/Util/TLogRouter.php b/framework/Util/TLogRouter.php
index 234d00e3..233fd373 100644
--- a/framework/Util/TLogRouter.php
+++ b/framework/Util/TLogRouter.php
@@ -591,21 +591,17 @@ class TBrowserLogRoute extends TLogRoute
{
if(empty($logs) || $this->getApplication()->getMode()==='Performance') return;
$first = $logs[0][3];
- $prev = $first;
$even = true;
$response = $this->getApplication()->getResponse();
$response->write($this->renderHeader());
for($i=0,$n=count($logs);$i<$n;++$i)
{
- //$timing['total'] = $log[3] - $first;
- //$timing['delta'] = $log[3] - $prev;
$timing['total'] = $logs[$i][3] - $first;
if ($i<$n-1)
$timing['delta'] = $logs[$i+1][3] - $logs[$i][3];
else
$timing['delta'] = '?';
$timing['even'] = !($even = !$even);
- //$prev=$log[3];
$response->write($this->renderMessage($logs[$i],$timing));
}
$response->write($this->renderFooter());
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index f76218ca..3d297e0a 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -288,7 +288,7 @@ class THttpResponse extends TModule implements ITextWriter
$charset=$this->getCharset();
if($charset==='' && ($globalization=$this->getApplication()->getGlobalization(false))!==null)
$charset=$globalization->getCharset();
- if($charset==='')
+ if($charset!=='')
{
$header='Content-Type: '.$this->getContentType().';charset='.$charset;
$this->appendHeader($header);