diff --git a/src/pkg/net/http/transport.go b/src/pkg/net/http/transport.go index dc70be43f2..62d36d6986 100644 --- a/src/pkg/net/http/transport.go +++ b/src/pkg/net/http/transport.go @@ -544,7 +544,7 @@ func (pc *persistConn) readLoop() { resp.Header.Del("Content-Length") resp.ContentLength = -1 gzReader, zerr := gzip.NewReader(resp.Body) - if err != nil { + if zerr != nil { pc.close() err = zerr } else {