author | Alberto Bertogli
<albertito@blitiri.com.ar> 2017-07-30 12:35:44 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2017-07-30 16:21:46 UTC |
parent | 733e4c506153549a417e61ebcff47e9a79eb43bd |
internal/httpstodns/server.go | +5 | -3 |
diff --git a/internal/httpstodns/server.go b/internal/httpstodns/server.go index c66d661..2864a70 100644 --- a/internal/httpstodns/server.go +++ b/internal/httpstodns/server.go @@ -180,9 +180,11 @@ func parseQuery(u *url.URL) (query, error) { return q, fmt.Errorf("name too long") } - q.rrType, err = stringToRRType(vs["type"]) - if err != nil { - return q, err + if _, ok = vs["type"]; ok { + q.rrType, err = stringToRRType(vs["type"]) + if err != nil { + return q, err + } } if cd, ok := vs["cd"]; ok {