mirror of
https://github.com/golang/go
synced 2024-11-12 01:50:22 -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.Header.Del("Content-Length")
|
||||||
resp.ContentLength = -1
|
resp.ContentLength = -1
|
||||||
gzReader, zerr := gzip.NewReader(resp.Body)
|
gzReader, zerr := gzip.NewReader(resp.Body)
|
||||||
if err != nil {
|
if zerr != nil {
|
||||||
pc.close()
|
pc.close()
|
||||||
err = zerr
|
err = zerr
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user