Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fix dns.resolve() with 'PTR' throws Error: Unknown type "PTR"
Browse files Browse the repository at this point in the history
Fixes #1038
  • Loading branch information
koichik authored and ry committed May 16, 2011
1 parent 80c2fe9 commit d4f82ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ var resolveMap = { A: exports.resolve4,
MX: exports.resolveMx,
TXT: exports.resolveTxt,
SRV: exports.resolveSrv,
PTR: exports.resolvePtr,
PTR: exports.reverse,
NS: exports.resolveNs,
CNAME: exports.resolveCname };

Expand Down
6 changes: 6 additions & 0 deletions test/simple/test-c-ares.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,9 @@ dns.lookup('ipv6.google.com', function(error, result, addressType) {
//assert.equal('string', typeof result);
assert.equal(6, addressType);
});

dns.resolve('127.0.0.1', 'PTR', function(error, domains) {
if (error) throw error;
assert.ok(Array.isArray(domains));
});

0 comments on commit d4f82ea

Please sign in to comment.