mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +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
2ee093b5b3
commit
60ff8bbe12
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user