From: Kees Monshouwer Date: Fri, 4 May 2018 10:02:13 +0000 (+0200) Subject: auth-api: remove headers X-Git-Tag: auth-4.1.2~1^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2105bb4c31623b65f9b094e818dbd3bee0c2a67b;p=pdns auth-api: remove headers --- diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index 5482b9c0e..b20c489f5 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -547,7 +547,7 @@ static void throwUnableToSecure(const DNSName& zonename) { + "capable backends are loaded, or because the backends have DNSSEC disabled. Check your configuration."); } -static void updateDomainSettingsFromDocument(UeberBackend& B, const DomainInfo& di, const DNSName& zonename, const Json document, HttpResponse* resp) { +static void updateDomainSettingsFromDocument(UeberBackend& B, const DomainInfo& di, const DNSName& zonename, const Json document) { string zonemaster; bool shouldRectify = false; for(auto value : document["masters"].array_items()) { @@ -684,11 +684,6 @@ static void updateDomainSettingsFromDocument(UeberBackend& B, const DomainInfo& throw ApiException("Hosting backend does not support editing records."); } } - - // return old and new serials in headers - resp->headers["X-PDNS-Old-Serial"] = std::to_string(sd.serial); - fillSOAData(rr.content, sd); - resp->headers["X-PDNS-New-Serial"] = std::to_string(sd.serial); } } } @@ -1367,7 +1362,7 @@ static void apiServerZones(HttpRequest* req, HttpResponse* resp) { di.backend->feedComment(c); } - updateDomainSettingsFromDocument(B, di, zonename, document, resp); + updateDomainSettingsFromDocument(B, di, zonename, document); di.backend->commitTransaction(); @@ -1401,7 +1396,7 @@ static void apiServerZoneDetail(HttpRequest* req, HttpResponse* resp) { if(!B.getDomainInfo(zonename, di)) throw ApiException("Could not find domain '"+zonename.toString()+"'"); - updateDomainSettingsFromDocument(B, di, zonename, req->json(), resp); + updateDomainSettingsFromDocument(B, di, zonename, req->json()); resp->body = ""; resp->status = 204; // No Content, but indicate success