From 5952b1c90e9d30b6111ecadbf8bc6f3cf8886abe Mon Sep 17 00:00:00 2001 From: G405G <guilongji@outlook.com> Date: 星期五, 18 十一月 2022 14:01:45 +0800 Subject: [PATCH] !253 过滤器链使用IoUtil.read方法导致request流关闭 * fix-过滤器链使用IoUtil.read方法导致request流关闭 --- ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java index e8549bf..77df9fd 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java @@ -196,6 +196,7 @@ * 鐢熸垚zip鏂囦欢 */ private void genCode(HttpServletResponse response, byte[] data) throws IOException { + response.reset(); response.addHeader("Access-Control-Allow-Origin", "*"); response.addHeader("Access-Control-Expose-Headers", "Content-Disposition"); response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\""); -- Gitblit v1.9.3