From 9811c34326d8b78e2586c1144cf3302aef053a39 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Tue, 28 Jan 2014 21:28:04 +0100 Subject: [PATCH] webserver: drop codepaths from /jsonstat --- pdns/ws.cc | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/pdns/ws.cc b/pdns/ws.cc index 4b54eaf42..e2777bc40 100644 --- a/pdns/ws.cc +++ b/pdns/ws.cc @@ -782,44 +782,10 @@ void StatWebServer::jsonstat(HttpRequest* req, HttpResponse* resp) return; } } - else if(command == "zone") { - string zonename = req->parameters["zone"]; - if (zonename.empty()) { - resp->status = 400; - resp->body = returnJSONError("Must give zone parameter"); - } - - if(req->method == "GET") { - // get current zone - resp->body = getZone(zonename); - return; - } else if (req->method == "DELETE") { - // delete - UeberBackend B; - DomainInfo di; - if(!B.getDomainInfo(zonename, di)) { - resp->body = returnJSONError("Deleting domain '"+zonename+"' failed: domain does not exist"); - return; - } - if(!di.backend->deleteDomain(zonename)) { - resp->body = returnJSONError("Deleting domain '"+zonename+"' failed: backend delete failed/unsupported"); - return; - } - map success; // empty success object - resp->body = returnJSONObject(success); - return; - } else { - throw HttpMethodNotAllowedException(); - } - } else if(command=="log-grep") { resp->body = makeLogGrepJSON(req->parameters["needle"], ::arg()["experimental-logfile"], " pdns["); return; } - else if(command=="domains") { - apiServerZones(req, resp); - return; - } resp->body = returnJSONError("No or unknown command given"); resp->status = 404; -- 2.40.0