From e47609087f345d8e7acdb6345c3a038fbf1237e7 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Mon, 7 Nov 2022 18:41:47 +0100 Subject: [PATCH] fixes #1 --- funcs/go1.16.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }