[Pdns-users] correct answer for lookup in backend
Remi Gacogne
remi.gacogne at powerdns.com
Thu Nov 30 08:07:51 UTC 2023
Hi,
On 29/11/2023 21:23, Alexis Fidalgo via Pdns-users wrote:
> Quick question, when using JSON/RPC in remote backend with http connector.
>
> {"method":"lookup", "parameters":{"qtype":"ANY", "qname":"www.example.com.", "remote":"192.0.2.24", "local":"192.0.2.1", "real-remote":"192.0.2.24", "zone-id":-1}}
>
> must be answered with
>
> {"result":[{"qtype":"A", "qname":"www.example.com", "content":"203.0.113.2", "ttl": 60}]}
>
> If theres no records to answer, which is the correct answer?
>
> 1. {“result”:[]}
> 2. {“result”:false}
The expected answer is an empty array. The current code treats a
non-array value as an empty array but I wouldn't rely on this behaviour.
Best regards,
--
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20231130/bf3c91d3/attachment.sig>
More information about the Pdns-users
mailing list