From 2ff4306cc62c00f798f55c07821ea6c7b5760437 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 28 Sep 2020 16:59:59 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20header?= =?UTF-8?q?=20attachment=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/download.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bbs/download.php b/bbs/download.php index 2b2aa1f2b..60e0a7dc2 100644 --- a/bbs/download.php +++ b/bbs/download.php @@ -100,7 +100,8 @@ if(preg_match("/[\xA1-\xFE][\xA1-\xFE]/", $file['bf_source'])){ } */ -$original = urlencode($file['bf_source']); +//$original = urlencode($file['bf_source']); +$original = rawurlencode($file['bf_source']); @include_once($board_skin_path.'/download.tail.skin.php'); @@ -114,7 +115,8 @@ if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_ } else if (preg_match("/Firefox/i", $_SERVER['HTTP_USER_AGENT'])){ header("content-type: file/unknown"); header("content-length: ".filesize($filepath)); - header("content-disposition: attachment; filename=\"".basename($file['bf_source'])."\""); + //header("content-disposition: attachment; filename=\"".basename($file['bf_source'])."\""); + header("content-disposition: attachment; filename=\"".$original."\""); header("content-description: php generated data"); } else { header("content-type: file/unknown");