remove hardcode instead of http status value (#1411)

This commit is contained in:
田欧
2018-06-26 17:21:32 +08:00
committed by Bo-Yi Wu
parent 1f59bad84b
commit 6c6d97ba2e
6 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileS
_, nolisting := fs.(*onlyfilesFS)
return func(c *Context) {
if nolisting {
c.Writer.WriteHeader(404)
c.Writer.WriteHeader(http.StatusNotFound)
}
fileServer.ServeHTTP(c.Writer, c.Request)
}