GithubHelp home page GithubHelp logo

Comments (8)

holic avatar holic commented on June 8, 2024

I should note that in all of these cases, dig returns the correct record value.

from lua-resty-dns.

agentzh avatar agentzh commented on June 8, 2024

@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.

holic avatar holic commented on June 8, 2024

@agentzh Sure! Try dig TXT github.keviningersoll.com.

from lua-resty-dns.

agentzh avatar agentzh commented on June 8, 2024

@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.

agentzh avatar agentzh commented on June 8, 2024

@holic I've just committed a fix to git master. Will you try it out?

from lua-resty-dns.

holic avatar holic commented on June 8, 2024

@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.

agentzh avatar agentzh commented on June 8, 2024

@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.

holic avatar holic commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.