aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/pkg/doh/doh.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/pkg/doh/doh.go b/plugin/pkg/doh/doh.go
index 575ae5369..9d5305b34 100644
--- a/plugin/pkg/doh/doh.go
+++ b/plugin/pkg/doh/doh.go
@@ -92,7 +92,7 @@ func requestToMsgGet(req *http.Request) (*dns.Msg, error) {
}
func toMsg(r io.ReadCloser) (*dns.Msg, error) {
- buf, err := io.ReadAll(io.LimitReader(r, 65536))
+ buf, err := io.ReadAll(http.MaxBytesReader(nil, r, 65536))
if err != nil {
return nil, err
}