From 2697c7b0dc9c9d49cfc1a3774c188f4c2de2b598 Mon Sep 17 00:00:00 2001 From: jacobi petrucciani Date: Mon, 29 Apr 2024 14:19:46 -0400 Subject: [PATCH] attempt to fix the modified if issue with index / --- s3proxy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s3proxy.go b/s3proxy.go index 281acb5..fc10431 100644 --- a/s3proxy.go +++ b/s3proxy.go @@ -189,13 +189,13 @@ func (p S3Proxy) getS3Object(bucket string, path string, headers http.Header) (* } if ifModifiedSince := headers.Get("If-Modified-Since"); ifModifiedSince != "" { t, err := time.Parse(http.TimeFormat, ifModifiedSince) - if err == nil { + if err == nil && path != "/" { oi = oi.SetIfModifiedSince(t) } } if ifUnmodifiedSince := headers.Get("If-Unmodified-Since"); ifUnmodifiedSince != "" { t, err := time.Parse(http.TimeFormat, ifUnmodifiedSince) - if err == nil { + if err == nil && path != "/" { oi = oi.SetIfUnmodifiedSince(t) } }