diff --git a/src/think/response/File.php b/src/think/response/File.php index e8af6fdfa5..fbf779d759 100644 --- a/src/think/response/File.php +++ b/src/think/response/File.php @@ -66,7 +66,7 @@ protected function output($data) $this->header['Pragma'] = 'public'; $this->header['Content-Type'] = $mimeType ?: 'application/octet-stream'; $this->header['Cache-control'] = 'max-age=' . $this->expire; - $this->header['Content-Disposition'] = ($this->force ? 'attachment; ' : '') . "filename* = UTF-8''{$name}"; + $this->header['Content-Disposition'] = ($this->force ? 'attachment; ' : '') . 'filename="' . $name . '";' . "filename* = UTF-8''{$name}"; $this->header['Content-Length'] = $size; $this->header['Content-Transfer-Encoding'] = 'binary'; $this->header['Expires'] = gmdate("D, d M Y H:i:s", time() + $this->expire) . ' GMT';