For zone PATCH requests, this adds a new `X-PDNS-Zone-Serial` response
header with the new zone serial.
Ideally this would be returned in a response JSON object, but this API
currently return 204 No Content and I did not want to break any clients
that might rely on this.
Modifies present RRsets and comments. Returns ``204 No Content`` on success.
+ The new zone serial will be returned in an `X-PDNS-Zone-Serial` header (auth 4.1+).
+
:param server_id: The name of the server
:param zone_id: The id number of the :json:object:`Zone`
if (!di.backend->replaceRRSet(di.id, rr.qname, rr.qtype, vector<DNSResourceRecord>(1, rr))) {
throw ApiException("Hosting backend does not support editing records.");
}
+
+ // return new serial in a header
+ fillSOAData(rr.content, sd);
+ resp->headers["X-PDNS-Zone-Serial"] = std::to_string(sd.serial);
}
} catch(...) {