Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Filer if-modified-since check doesn't fire on "exact" #3467

chrislufdd8c5d5e0a3
diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go
index fcd08a79e9..718071da18 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
}