From 30876ae2bfed45a0929be0fdbe5068523c270820 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Tue, 18 Dec 2018 01:46:41 +0800 Subject: [PATCH] test fd --- response.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/response.go b/response.go index bf7acdd..c48c81c 100644 --- a/response.go +++ b/response.go @@ -45,10 +45,6 @@ func FromHTTPResponse(resp *http.Response) (*Response, error) { } content = string(buf) } else { - if r != nil { - r.Close() - } - r, err := zlib.NewReader(srcReader) if err == nil { defer r.Close() @@ -58,9 +54,6 @@ func FromHTTPResponse(resp *http.Response) (*Response, error) { } content = string(buf) } else { - if r != nil { - r.Close() - } content = string(srcbuf) } }