[go-nuts] Re: Can't read >32KBytes from http response body.

2022-06-22 Thread Min Xie
We've managed to identify the issue and found a temporary solution. The issue only happens when the stream encoding is "gzip" and the uncompressed size is greater than 32KBytes. Side by side we've compared the server stream with plain text and gzip. The gzip uncompression is automatically enga

[go-nuts] Can't read >32KBytes from http response body.

2022-06-19 Thread Min Xie
All, I got puzzled by how to read a response size > 32KBytes from http resp.Body. All I get is 32768 bytes. With either io.Read functions or bufio.Reader. *buffer := make([]byte, 1024)var total_bytes_read int for { len, err := io.ReadAtLeast(res.Body, buffer, 1024) total_byt