From fdd8c5d5e0a324c5e2f775b4b52fd97da42a0b50 Mon Sep 17 00:00:00 2001 From: chrislu Date: Fri, 19 Aug 2022 22:21:51 -0700 Subject: [PATCH] Filer if-modified-since check doesn't fire on "exact" #3467 fix https://github.com/seaweedfs/seaweedfs/issues/3467 --- weed/server/filer_server_handlers_read.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go index fcd08a79e..718071da1 100644 --- a/weed/server/filer_server_handlers_read.go +++ b/weed/server/filer_server_handlers_read.go @@ -70,7 +70,7 @@ func checkPreconditions(w http.ResponseWriter, r *http.Request, entry *filer.Ent } } else if ifModifiedSinceHeader != "" { if t, parseError := time.Parse(http.TimeFormat, ifModifiedSinceHeader); parseError == nil { - if t.After(entry.Attr.Mtime) { + if !t.Before(entry.Attr.Mtime) { w.WriteHeader(http.StatusNotModified) return true }