From d2e0713ceb8256ba1c0ab88f92eacc2b81dcdbd2 Mon Sep 17 00:00:00 2001 From: rramiachraf <51409801+rramiachraf@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:38:02 +0100 Subject: [PATCH] fix: close body response after serving client --- lyrics.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lyrics.go b/lyrics.go index 72d4c56..4f95857 100644 --- a/lyrics.go +++ b/lyrics.go @@ -91,6 +91,8 @@ func lyricsHandler(w http.ResponseWriter, r *http.Request) { return } + defer resp.Body.Close() + if resp.StatusCode == http.StatusNotFound { w.WriteHeader(http.StatusNotFound) render("error", w, map[string]string{