From 9b16b0c24b4cdd20aa3e9125b5354af1102be453 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 26 Sep 2016 09:27:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E7=BC=93=E5=AD=98=E5=8F=91?= =?UTF-8?q?=E9=80=81304?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/think/Request.php b/library/think/Request.php index 6c19c44a..1a8b6046 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1487,7 +1487,9 @@ class Request if (Cache::has($key)) { // 读取缓存 $content = Cache::get($key); - $response = Response::create($content)->header('Content-Type', Cache::get($key . '_header')); + $response = Response::create($content) + ->code(304) + ->header('Content-Type', Cache::get($key . '_header')); throw new \think\exception\HttpResponseException($response); } else { $this->cache = [$key, $expire];