parent
6470b8335d
commit
37ef7bd219
2
msg.go
2
msg.go
|
@ -650,7 +650,7 @@ func unpackStructValue(val reflect.Value, msg []byte, off int) (off1 int, ok boo
|
|||
println("dns: failure unpacking txt strings")
|
||||
return lenmsg, false
|
||||
}
|
||||
txt = append(txt, string(msg[off+1:off+l]))
|
||||
txt = append(txt, string(msg[off+1:off+l+1]))
|
||||
off += l+1
|
||||
if off < rdlength {
|
||||
// More
|
||||
|
|
|
@ -202,6 +202,8 @@ func TestQuotes(t *testing.T) {
|
|||
`t.example.com. IN TXT "a bc"`: "t.example.com.\t3600\tIN\tTXT\t\"a bc\"",
|
||||
`t.example.com. IN TXT "a
|
||||
bc"`: "t.example.com.\t3600\tIN\tTXT\t\"a\n bc\"",
|
||||
`t.example.com. IN TXT "a"`: "t.example.com.\t3600\tIN\tTXT\t\"a\"",
|
||||
`t.example.com. IN TXT "aa"`: "t.example.com.\t3600\tIN\tTXT\t\"aa\"",
|
||||
`t.example.com. IN TXT "aaa" ;`: "t.example.com.\t3600\tIN\tTXT\t\"aaa\"",
|
||||
`t.example.com. IN TXT "abc" "DEF"`: "t.example.com.\t3600\tIN\tTXT\t\"abc\" \"DEF\"",
|
||||
`t.example.com. IN TXT "abc" ( "DEF" )`: "t.example.com.\t3600\tIN\tTXT\t\"abc\" \"DEF\"",
|
||||
|
|
Loading…
Reference in New Issue