summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorxue <>2006-04-18 23:29:18 +0000
committerxue <>2006-04-18 23:29:18 +0000
commit3ff35ae583c52e54418a61cabf3282c00a8039d1 (patch)
tree0b21fa425e043d0375b64c9fd1679d878a04206b /framework/Web
parent7fe4f0ec9b89ba568cf0ddabffd929ed8e6739a5 (diff)
Merge from 3.0 branch till 942.
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/THttpResponse.php2
1 files changed, 1 insertions, 1 deletions
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)