mirror of
https://github.com/golang/go
synced 2024-11-24 22:57:57 -07:00
net/http: fix bug in error checking
Thanks to josef86@gmail.com for pointing this out. R=golang-dev, iant CC=golang-dev https://golang.org/cl/5477092
This commit is contained in:
parent
e14d1d7e41
commit
c0421d92c8
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user