提交 254251ee authored 作者: Thomas Mueller's avatar Thomas Mueller

H2 Console: the built-in web server did not work properly if an unknown file was requested.

上级 d4c470a8
...@@ -148,8 +148,9 @@ class WebThread extends WebApp implements Runnable { ...@@ -148,8 +148,9 @@ class WebThread extends WebApp implements Runnable {
} else { } else {
bytes = server.getFile(file); bytes = server.getFile(file);
if (bytes == null) { if (bytes == null) {
message = "HTTP/1.0 404 Not Found\r\n"; message = "HTTP/1.1 404 Not Found\r\n";
bytes = ("File not found: " + file).getBytes(Constants.UTF8); bytes = ("File not found: " + file).getBytes(Constants.UTF8);
message += "Content-Length: " + bytes.length + "\r\n";
} else { } else {
if (session != null && file.endsWith(".jsp")) { if (session != null && file.endsWith(".jsp")) {
String page = new String(bytes, Constants.UTF8); String page = new String(bytes, Constants.UTF8);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论