diff --git a/funcs/go1.16.go b/funcs/go1.16.go index 9f20fcb..9cd38f3 100644 --- a/funcs/go1.16.go +++ b/funcs/go1.16.go @@ -21,10 +21,10 @@ func headheader(f fs.File, c *gin.Context) (nocontent bool) { } c.Writer.Header().Set("Last-Modified", stats.ModTime().Format(time.RFC1123)) if t, err := time.Parse(time.RFC1123, c.GetHeader("If-Modified-Since")); stats.ModTime().After(t) && err == nil { - nocontent = true - } - if nocontent { c.Status(http.StatusNotModified) + nocontent = true + } else { + c.Status(http.StatusOK) } return }