From f71e19aec44c75cccb85223685c240a29bb70d59 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:43:00 +0100 Subject: [PATCH] Proper response status --- FinalCommander.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FinalCommander.go b/FinalCommander.go index 575d39c..9f095ef 100644 --- a/FinalCommander.go +++ b/FinalCommander.go @@ -160,11 +160,12 @@ func handle(ctx *httputils.RequestContext) { } return } else if pathElements[3] == "drop" { //Drop key from cache - ctx.SetResponseCode(http.StatusOK) + ctx.SetResponseCode(http.StatusNoContent) _ = db.RemoveEntry(key) if entry != nil && !entry.Key.Equals(key) { _ = db.RemoveEntry(&entry.Key) } + ctx.ServeBytes([]byte{}) return }