diff --git a/CHANGELOG.md b/CHANGELOG.md index b4ad0ac59..544646e92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Fixes: * Fixed an issue with filtering from results files in Race Weekends when the Race Weekend is within a Championship. * We've changed the method that we use to check if scheduled events need running. Hopefully this should make scheduled events more reliable! +* Fixes a memory leak when proxying STracker pages --- diff --git a/stracker.go b/stracker.go index 3b5f5d556..c8a5557f0 100644 --- a/stracker.go +++ b/stracker.go @@ -374,6 +374,10 @@ func (sth *StrackerHandler) proxy(w http.ResponseWriter, r *http.Request) { return err } + if err := r.Body.Close(); err != nil { + return err + } + r.Body = ioutil.NopCloser(buf) r.Header.Set("Content-Length", fmt.Sprint(buf.Len()))