From 60ff8bbe12ac33b15387272ffb843dc86a308597 Mon Sep 17 00:00:00 2001 From: lzpeng723 <1500913306@qq.com> Date: Sun, 19 Nov 2023 04:44:35 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E5=90=91=20response?= =?UTF-8?q?=20=E4=B8=AD=E5=86=99=E5=85=A5=E6=96=87=E4=BB=B6=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=20=E8=BF=98=E4=BC=9A=E7=BB=A7=E7=BB=AD=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=20response.send404("404=20Not=20Found=20!");=20?= =?UTF-8?q?=E6=AD=A4=E6=97=B6=E4=BC=9A=E5=9C=A8=20cn.hutool.http.server.Ht?= =?UTF-8?q?tpServerResponse#send(int,=20long)=20=E6=8A=9B=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lzpeng723 <1500913306@qq.com> --- .../java/org/dromara/hutool/http/server/action/RootAction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hutool-http/src/main/java/org/dromara/hutool/http/server/action/RootAction.java b/hutool-http/src/main/java/org/dromara/hutool/http/server/action/RootAction.java index 99f1a261e..dcc7828f2 100644 --- a/hutool-http/src/main/java/org/dromara/hutool/http/server/action/RootAction.java +++ b/hutool-http/src/main/java/org/dromara/hutool/http/server/action/RootAction.java @@ -85,11 +85,13 @@ public class RootAction implements Action { file = FileUtil.file(file, indexFileName); if (file.exists() && file.isFile()) { response.write(file); + return; } } } else{ final String name = request.getParam("name"); response.write(file, name); + return; } }