- Make theme files and history.txt return 403 on error,
not 500, to avoid the new error page
This commit is contained in:
@ -8,5 +8,9 @@
|
|||||||
*/
|
*/
|
||||||
response.setContentType("text/plain");
|
response.setContentType("text/plain");
|
||||||
String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath();
|
String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath();
|
||||||
net.i2p.util.FileUtil.readFile("history.txt", base, response.getOutputStream());
|
try {
|
||||||
|
net.i2p.util.FileUtil.readFile("history.txt", base, response.getOutputStream());
|
||||||
|
} catch (java.io.IOException ioe) {
|
||||||
|
response.sendError(403, ioe.toString());
|
||||||
|
}
|
||||||
%>
|
%>
|
@ -44,5 +44,9 @@ if (themePath != null)
|
|||||||
else
|
else
|
||||||
base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath() +
|
base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath() +
|
||||||
java.io.File.separatorChar + "docs";
|
java.io.File.separatorChar + "docs";
|
||||||
net.i2p.util.FileUtil.readFile(uri, base, response.getOutputStream());
|
try {
|
||||||
|
net.i2p.util.FileUtil.readFile(uri, base, response.getOutputStream());
|
||||||
|
} catch (java.io.IOException ioe) {
|
||||||
|
response.sendError(403, ioe.toString());
|
||||||
|
}
|
||||||
%>
|
%>
|
Reference in New Issue
Block a user