Skip to content

Commit

Permalink
🐛 fix write status sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Feb 18, 2022
1 parent 9778880 commit 270349f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/controllers/other.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func Plist(c *gin.Context) {
</array>
</dict>
</plist>`, u, name, name)
c.Status(200)
c.Header("Content-Type", "application/xml;charset=utf-8")
c.Status(200)
_, _ = c.Writer.WriteString(plist)
}
2 changes: 1 addition & 1 deletion server/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 270349f

Please sign in to comment.