Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dns] - resolveTxt ttl flag #39528

Closed
tanguyantoine opened this issue Jul 26, 2021 · 4 comments
Closed

[dns] - resolveTxt ttl flag #39528

tanguyantoine opened this issue Jul 26, 2021 · 4 comments
Labels
cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. dns Issues and PRs related to the dns subsystem. duplicate Issues and PRs that are duplicates of other issues or PRs. feature request Issues that request new features to be added to Node.js.

Comments

@tanguyantoine
Copy link

tanguyantoine commented Jul 26, 2021

Is your feature request related to a problem? Please describe.
I would like to implement some application cache on top of dns.resolveTxt but TTL are not parsed nor returned by the dns lib

Describe the solution you'd like
The same way as https://nodejs.org/docs/latest-v15.x/api/dns.html#dns_dns_resolve4_hostname_options_callback I would love to have the ability to provide a ttl boolean flag so that I retrieved the dnx txt records with their ttl

Describe alternatives you've considered
None

Note: I updated unit tests to show case how I would like to use this API: #39529

@gireeshpunathil
Copy link
Member

@nodejs/dns

@tniessen
Copy link
Member

tniessen commented Aug 8, 2021

For reference, the ttl option was discussed in #5893 and added in #9296.

The implementation appears to achieve this using ares_parse_a_reply and ares_parse_aaaa_reply, respectively. However, other parse functions, such as ares_parse_ns_reply, ares_parse_ptr_reply, ares_parse_mx_reply, ares_parse_txt_reply_ext, etc. do not appear to support retrieving the TTL of the records.

@tniessen tniessen changed the title [dsn] - resolveTxt ttl flag [dns] - resolveTxt ttl flag Aug 8, 2021
@tniessen tniessen added dns Issues and PRs related to the dns subsystem. feature request Issues that request new features to be added to Node.js. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. labels Aug 8, 2021
@tniessen
Copy link
Member

tniessen commented Aug 8, 2021

This appears to be a duplicate of #39399. Feel free to reopen if that's not correct.

@tniessen tniessen closed this as completed Aug 8, 2021
@tniessen tniessen added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Aug 8, 2021
@tanguyantoine
Copy link
Author

haha I'm late ^^ 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. dns Issues and PRs related to the dns subsystem. duplicate Issues and PRs that are duplicates of other issues or PRs. feature request Issues that request new features to be added to Node.js.
Projects
None yet
Development

No branches or pull requests

3 participants