forked from I2P_Developers/i2p.i2p
2005-12-16 jrandom
* Added some I2PSnark sanity checks, an OOMListener when running standalone, and a guard against keeping memory tied up indefinitely. * Sanity check on the watchdog (thanks zzz!) * Handle invalid HTTP requests in I2PTunnel a little better
This commit is contained in:
@ -386,6 +386,18 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
|
||||
} else {
|
||||
request = request.substring(pos + 1);
|
||||
pos = request.indexOf("/");
|
||||
if (pos < 0) {
|
||||
l.log("Invalid request url [" + request + "]");
|
||||
if (out != null) {
|
||||
out.write(ERR_REQUEST_DENIED);
|
||||
out.write("<p /><i>Generated on: ".getBytes());
|
||||
out.write(new Date().toString().getBytes());
|
||||
out.write("</i></body></html>\n".getBytes());
|
||||
out.flush();
|
||||
}
|
||||
s.close();
|
||||
return;
|
||||
}
|
||||
destination = request.substring(0, pos);
|
||||
line = method + " " + request.substring(pos);
|
||||
}
|
||||
|
Reference in New Issue
Block a user