2010-12-03 20:40:34 +00:00
|
|
|
<%
|
|
|
|
/*
|
|
|
|
* USE CAUTION WHEN EDITING
|
|
|
|
* Trailing whitespace OR NEWLINE on the last line will cause
|
|
|
|
* IllegalStateExceptions !!!
|
|
|
|
*
|
|
|
|
* Do not tag this file for translation.
|
|
|
|
*/
|
|
|
|
response.setContentType("text/plain");
|
|
|
|
String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath();
|
2010-12-31 13:13:26 +00:00
|
|
|
try {
|
|
|
|
net.i2p.util.FileUtil.readFile("history.txt", base, response.getOutputStream());
|
|
|
|
} catch (java.io.IOException ioe) {
|
2011-04-28 18:01:48 +00:00
|
|
|
// prevent 'Committed' IllegalStateException from Jetty
|
|
|
|
if (!response.isCommitted()) {
|
|
|
|
response.sendError(403, ioe.toString());
|
|
|
|
} else {
|
2011-07-01 11:05:06 +00:00
|
|
|
// not an error, happens when the browser closes the stream
|
|
|
|
net.i2p.I2PAppContext.getGlobalContext().logManager().getLog(getClass()).warn("Error serving history.txt", ioe);
|
2011-04-28 18:01:48 +00:00
|
|
|
// Jetty doesn't log this
|
|
|
|
throw ioe;
|
|
|
|
}
|
2010-12-31 13:13:26 +00:00
|
|
|
}
|
2010-12-03 20:40:34 +00:00
|
|
|
%>
|