This adds the old serial as X-PDNS-Old-Serial and renames the header of
the new one to match.
The old serial is useful to verify that no other PATCH happened in the
meantime.
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+).
+ The new and old zone serials will be returned in `X-PDNS-New-Serial` and `X-PDNS-Old-Serial` headers (auth 4.1+).
:param server_id: The name of the server
:param zone_id: The id number of the :json:object:`Zone`
throw ApiException("Hosting backend does not support editing records.");
}
- // return new serial in a header
+ // 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-Zone-Serial"] = std::to_string(sd.serial);
+ resp->headers["X-PDNS-New-Serial"] = std::to_string(sd.serial);
}
} catch(...) {