It's said that Transport
will handle the Content-Encoding
automatically (like auto decompressing when reading from resp.Body
).
It's also said that, Content-Encoding
is an end-to-end HTTP header, not a hop-by-hop one.
Therefore, if a proxy copied Content-Encoding
back to client's response header, and this proxy also io.Copy
the upstream response body (which may decompressing automatically since io.Copy
will read from resp.Body
), won't it be inconsistent to client? (Content-Encoding
copied from upstream response, but body has been decompressed)