q understand urls, and strips them

This commit is contained in:
Miek Gieben 2012-12-03 17:06:46 +01:00
parent 74cf502baf
commit 1e795e3dd1
1 changed files with 7 additions and 0 deletions

View File

@ -182,6 +182,13 @@ Flags:
}
for _, v := range qname {
if strings.HasPrefix(v, "http://") {
v = v[7:]
if v[len(v)-1] == '/' {
v = v[:len(v)-1]
}
}
m.Question[0] = dns.Question{dns.Fqdn(v), qtype, qclass}
m.Id = dns.Id()
if *query {