🐛 fix write status sequence

pull/661/head
微凉 2022-02-18 18:58:02 +08:00
parent 977888070a
commit 270349f37c
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ func Plist(c *gin.Context) {
</array> </array>
</dict> </dict>
</plist>`, u, name, name) </plist>`, u, name, name)
c.Status(200)
c.Header("Content-Type", "application/xml;charset=utf-8") c.Header("Content-Type", "application/xml;charset=utf-8")
c.Status(200)
_, _ = c.Writer.WriteString(plist) _, _ = c.Writer.WriteString(plist)
} }

View File

@ -48,8 +48,8 @@ func Static(r *gin.Engine) {
r.StaticFS("/assets/", http.FS(assets)) r.StaticFS("/assets/", http.FS(assets))
r.StaticFS("/public/", http.FS(pub)) r.StaticFS("/public/", http.FS(pub))
r.NoRoute(func(c *gin.Context) { r.NoRoute(func(c *gin.Context) {
c.Status(200)
c.Header("Content-Type", "text/html") c.Header("Content-Type", "text/html")
c.Status(200)
if strings.HasPrefix(c.Request.URL.Path, "/@manage") { if strings.HasPrefix(c.Request.URL.Path, "/@manage") {
_, _ = c.Writer.WriteString(conf.ManageHtml) _, _ = c.Writer.WriteString(conf.ManageHtml)
} else { } else {