X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gocheese.go;h=3eadf99010d0a1bab9757a324c5a6e97f3d4af4d;hb=37ec3baee033beb22e2c06f0a896afd223a92eb4;hp=7a36129746ab96d1254564d69385323639531d1d;hpb=902150e27fa1530823817eb3227f9100b27d9410;p=gocheese.git diff --git a/gocheese.go b/gocheese.go index 7a36129..3eadf99 100644 --- a/gocheese.go +++ b/gocheese.go @@ -107,8 +107,8 @@ func refreshDir(w http.ResponseWriter, r *http.Request, dir, filenameGet string) http.Error(w, err.Error(), http.StatusBadGateway) return false } - defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) + resp.Body.Close() if err != nil { http.Error(w, err.Error(), http.StatusBadGateway) return false