author | Alberto Bertogli
<albertito@blitiri.com.ar> 2018-07-17 09:08:25 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2018-07-17 09:08:25 UTC |
parent | bf20861288f42f69e88eaa4eacadd7a41cb9e0a8 |
internal/httpresolver/resolver.go | +2 | -2 |
diff --git a/internal/httpresolver/resolver.go b/internal/httpresolver/resolver.go index fd805c3..17c5fb2 100644 --- a/internal/httpresolver/resolver.go +++ b/internal/httpresolver/resolver.go @@ -145,7 +145,7 @@ func (r *httpsResolver) queryDoH(req *dns.Msg, tr trace.Trace) (*dns.Msg, error) return nil, fmt.Errorf("unknown response content type %q", ct) } - respRaw, err := ioutil.ReadAll(io.LimitReader(hr.Body, 4092)) + respRaw, err := ioutil.ReadAll(io.LimitReader(hr.Body, 64*1024)) if err != nil { return nil, fmt.Errorf("error reading from body: %v", err) } @@ -197,7 +197,7 @@ func (r *httpsResolver) queryJSON(req *dns.Msg, tr trace.Trace) (*dns.Msg, error } // Read the HTTPS response, and parse the JSON. - body, err := ioutil.ReadAll(hr.Body) + body, err := ioutil.ReadAll(io.LimitReader(hr.Body, 64*1024)) if err != nil { return nil, fmt.Errorf("Failed to read body: %v", err) }