summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/Util/TLogRouter.php7
-rw-r--r--framework/Web/THttpResponse.php2
2 files changed, 7 insertions, 2 deletions
diff --git a/framework/Util/TLogRouter.php b/framework/Util/TLogRouter.php
index 233fd373..fe0d2964 100644
--- a/framework/Util/TLogRouter.php
+++ b/framework/Util/TLogRouter.php
@@ -596,11 +596,16 @@ class TBrowserLogRoute extends TLogRoute
$response->write($this->renderHeader());
for($i=0,$n=count($logs);$i<$n;++$i)
{
- $timing['total'] = $logs[$i][3] - $first;
if ($i<$n-1)
+ {
$timing['delta'] = $logs[$i+1][3] - $logs[$i][3];
+ $timing['total'] = $logs[$i+1][3] - $first;
+ }
else
+ {
$timing['delta'] = '?';
+ $timing['total'] = $logs[$i][3] - $first;
+ }
$timing['even'] = !($even = !$even);
$response->write($this->renderMessage($logs[$i],$timing));
}
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index ee2dd99b..18be9fec 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -254,7 +254,7 @@ class THttpResponse extends TModule implements ITextWriter
header('Expires: 0');
header('Cache-Component: must-revalidate, post-check=0, pre-check=0');
header("Content-type: $mimeType");
- header('Content-Length: '.filesize($fileName));
+ header('Content-Length: '.($content===null?filesize($fileName):strlen($content)));
header("Content-Disposition: attachment; filename=\"$fn\"");
header('Content-Transfer-Encoding: binary');
if($content===null)