mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
修复已向 response 中写入文件后,
还会继续执行 response.send404("404 Not Found !"); 此时会在cn.hutool.http.server.HttpServerResponse#send(int, long) 抛异常 Signed-off-by: lzpeng723 <1500913306@qq.com>
This commit is contained in:
parent
088f3ecfc0
commit
b613d1e3a5
@ -73,11 +73,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user