Comments (8)
I should note that in all of these cases, dig
returns the correct record value.
from lua-resty-dns.
@holic Do you have a live DNS record in the wild that I can check out? Failing that, will you provide a hex dump of the raw response UDP packet payload from your DNS server?
from lua-resty-dns.
@agentzh Sure! Try dig TXT github.keviningersoll.com
.
from lua-resty-dns.
@holic Okay, I see what is going on. This is because the current implementation of resty.dns.resolver
does not parse the TXT record data into one or more "character-strings". I'll fix it shortly. The weird prefix characters you're seeing are just the length octets for the following strings. Thank you for your report!
from lua-resty-dns.
@holic I've just committed a fix to git master. Will you try it out?
from lua-resty-dns.
@agentzh Can you explain the table of strings? In what cases would the strings be separated and why? I would expect a TXT record to have a single string value.
from lua-resty-dns.
@holic RFC 1035 allows multiple character strings sit inside a single TXT record data part: http://tools.ietf.org/html/rfc1035#section-3.3.14 I just implement it the way the standard specifies.
Whether or not to make use of multiple strings is completely depending on the concrete application-level decisions. In the real world, it is usually just a single string though.
from lua-resty-dns.
Ahh, I didn't realize that TXT records could include separate "parts".
For anyone looking at this issue later, most TXT records you'll find look like this:
some.host.name. IN TXT "some-txt=some value"
Above is an example of a single string value. This is also a perfectly valid TXT record:
some.host.name. IN TXT "some-txt=some value" "another-txt=another value"
Above is an example of multiple string values.
from lua-resty-dns.
Related Issues (20)
- error: .../modules/lua-resty-dns-master/lib/resty/dns/resolver.lua:92: attempt to call local 'new_tab' (a table value) HOT 1
- /etc/hosts support? HOT 3
- Getting "failed to set peer name: resource temporarily unavailable" when using the module
- How does the module process for cache? HOT 2
- add "nameservers" to docs HOT 1
- the TCP client does not do any retries ('retrans' option) HOT 3
- dead resolver raises exception HOT 2
- how does the r:query parameter option:qtype? HOT 4
- is it possible to cache the answers for 15 secs? HOT 2
- Test case failing on rhel 7.6 ppc64le platform HOT 1
- how to return ipv4 address only.... HOT 6
- domain name resolution on pure ipv6 kubernetes HOT 1
- 域名解析报错 code=3
- How to get the fixed TTL?
- wire format HOT 5
- Return domain name by ip address HOT 1
- Error doing NS query
- tcp_sock is closed after tcp_query
- Use EDNS
- Does it support access via proxy?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-resty-dns.