From bb283c72ce96bc68c4f56b8b0d80ce04be600a1b Mon Sep 17 00:00:00 2001 From: studiokaiji Date: Mon, 23 Oct 2023 08:05:23 +0900 Subject: [PATCH] =?UTF-8?q?kind=E3=81=8C=E8=A6=8B=E3=81=A4=E3=81=8B?= =?UTF-8?q?=E3=82=89=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=81=AB=E8=A4=87?= =?UTF-8?q?=E6=95=B0=E3=81=AE=E3=83=AC=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B9?= =?UTF-8?q?=E3=81=8C=E8=B2=B7=E3=81=88=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E8=A7=A3=E6=B1=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hostr/cmd/server/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hostr/cmd/server/server.go b/hostr/cmd/server/server.go index aa2e6e0..61043d6 100644 --- a/hostr/cmd/server/server.go +++ b/hostr/cmd/server/server.go @@ -77,8 +77,9 @@ func Start(port string, mode string) { contentType, err := tools.GetContentType(ev.Kind) if err != nil { ctx.String(http.StatusNotFound, http.StatusText(http.StatusNotFound)) + } else { + ctx.Data(http.StatusOK, contentType, []byte(ev.Content)) } - ctx.Data(http.StatusOK, contentType, []byte(ev.Content)) } else { ctx.String(http.StatusNotFound, http.StatusText(http.StatusNotFound)) }