From 64132ec18f8665e6b187db5649cf6980bd332e3d Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 24 May 2023 23:52:33 +0400 Subject: [PATCH] Removed missed w.WriteHeader(). --- internal/http/handlers.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 99f2a0a..7357c4a 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -74,7 +74,6 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) { f, fHandler, err := r.FormFile("file") if err != nil { log.Println("failed to open incoming file:", err) - w.WriteHeader(http.StatusInternalServerError) Error(w, r, http.StatusInternalServerError, "Error reading an incoming file.") return }