fix: set to unknown to avoid Content-Length mismatched

This commit is contained in:
debugtalk
2022-02-21 20:11:55 +08:00
parent d534fe06ee
commit e5b53df245

View File

@@ -817,6 +817,7 @@ func decodeResponseBody(resp *http.Response) error {
return err
}
resp.Body = gr
resp.ContentLength = -1 // set to unknown to avoid Content-Length mismatched
case "deflate":
resp.Body = flate.NewReader(resp.Body)
}