From 270349f37c5d60b0c3276852186f3d54263dc429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= <927625802@qq.com> Date: Fri, 18 Feb 2022 18:58:02 +0800 Subject: [PATCH] :bug: fix write status sequence --- server/controllers/other.go | 2 +- server/static.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/controllers/other.go b/server/controllers/other.go index 7869307d090..dd73854751e 100644 --- a/server/controllers/other.go +++ b/server/controllers/other.go @@ -56,7 +56,7 @@ func Plist(c *gin.Context) { `, u, name, name) - c.Status(200) c.Header("Content-Type", "application/xml;charset=utf-8") + c.Status(200) _, _ = c.Writer.WriteString(plist) } diff --git a/server/static.go b/server/static.go index 818d8c89230..3e19564a06a 100644 --- a/server/static.go +++ b/server/static.go @@ -48,8 +48,8 @@ func Static(r *gin.Engine) { r.StaticFS("/assets/", http.FS(assets)) r.StaticFS("/public/", http.FS(pub)) r.NoRoute(func(c *gin.Context) { - c.Status(200) c.Header("Content-Type", "text/html") + c.Status(200) if strings.HasPrefix(c.Request.URL.Path, "/@manage") { _, _ = c.Writer.WriteString(conf.ManageHtml) } else {