From f8351b935d9c536f5f8ad2e0519b891ef153aaaa Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 24 May 2023 23:56:12 +0400 Subject: [PATCH] Moved WriteHeader to nospace.jade. --- internal/http/handlers.go | 1 - web/templates/nospace.jade | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 7357c4a..194481b 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -86,7 +86,6 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) { if leftSpace < fHandler.Size { log.Println("not enough space left in storage, only", leftSpace>>20, "MiB left") - w.WriteHeader(http.StatusInternalServerError) web.ErrorNoSpace(utils.MainSite(r.Host), w) } diff --git a/web/templates/nospace.jade b/web/templates/nospace.jade index 94d5ef4..d0778b1 100644 --- a/web/templates/nospace.jade +++ b/web/templates/nospace.jade @@ -15,5 +15,6 @@ block header h1 :( block body + - wr.(http.ResponseWriter).WriteHeader(http.StatusInternalServerError) section#error h1 Not enough space left