And a flag to disable

This commit is contained in:
Miek Gieben 2012-12-03 17:27:43 +01:00
parent 1e795e3dd1
commit 37fddc0178
1 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ func main() {
dnssec := flag.Bool("dnssec", false, "request DNSSEC records") dnssec := flag.Bool("dnssec", false, "request DNSSEC records")
query := flag.Bool("question", false, "show question") query := flag.Bool("question", false, "show question")
check := flag.Bool("check", false, "check internal DNSSEC consistency") check := flag.Bool("check", false, "check internal DNSSEC consistency")
raw := flag.Bool("raw", false, "do not strip 'http://' from the qname")
six := flag.Bool("6", false, "use IPv6 only") six := flag.Bool("6", false, "use IPv6 only")
four := flag.Bool("4", false, "use IPv4 only") four := flag.Bool("4", false, "use IPv4 only")
anchor := flag.String("anchor", "", "use the DNSKEY in this file for interal DNSSEC consistency") anchor := flag.String("anchor", "", "use the DNSKEY in this file for interal DNSSEC consistency")
@ -182,7 +183,7 @@ Flags:
} }
for _, v := range qname { for _, v := range qname {
if strings.HasPrefix(v, "http://") { if !*raw && strings.HasPrefix(v, "http://") {
v = v[7:] v = v[7:]
if v[len(v)-1] == '/' { if v[len(v)-1] == '/' {
v = v[:len(v)-1] v = v[:len(v)-1]