* Jetty: Disable TRACE and OPTIONS in console and eepsite

This commit is contained in:
zzz
2010-06-29 02:29:42 +00:00
parent 2025fe7c20
commit 22ea79a4ff
4 changed files with 61 additions and 0 deletions

View File

@ -117,6 +117,12 @@ public class I2PSnarkServlet extends Default {
*/
@Override
public void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
// since we are not overriding handle*(), do this here
String method = req.getMethod();
if (!(method.equals("GET") || method.equals("HEAD") || method.equals("POST"))) {
resp.sendError(HttpResponse.__405_Method_Not_Allowed);
return;
}
// this is the part after /i2psnark
String path = req.getServletPath();
boolean isConfigure = "/configure".equals(path);