From: Sergey Matveev Date: Tue, 12 Oct 2021 14:20:48 +0000 (+0300) Subject: Do not forget about body closing X-Git-Tag: v0.1.0~57 X-Git-Url: http://www.git.stargrave.org/?p=tofuproxy.git;a=commitdiff_plain;h=30dad51e496a127b1e78c52d70065a4db4da8f55 Do not forget about body closing --- diff --git a/trip.go b/trip.go index d4ed572..2d04a18 100644 --- a/trip.go +++ b/trip.go @@ -59,6 +59,7 @@ type Round func( ) (bool, error) func roundTrip(w http.ResponseWriter, req *http.Request) { + defer req.Body.Close() fifos.LogReq <- fmt.Sprintf("%s %s", req.Method, req.URL) host := strings.TrimSuffix(req.URL.Host, ":443") for _, round := range []Round{