Commit c0421d92 authored by Robert Griesemer's avatar Robert Griesemer

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
parent e14d1d7e
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment