From f5ea776e87e1bdd33890758dc9ecd5c728047425 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 30 Jul 2022 15:35:13 +0400 Subject: [PATCH] handlers.go. Now image is being returned by value. --- internal/handlers/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 567dd9a..8ca27b9 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -39,7 +39,7 @@ func (h *CaptchaHandlers) Image(w http.ResponseWriter, r *http.Request) { w.Header().Add("Content-Disposition", "inline; filename=\""+string(captchaID)+"\"") - png.Encode(w, *captchaImage) + png.Encode(w, captchaImage) } func (h *CaptchaHandlers) Solve(w http.ResponseWriter, r *http.Request) {