From 7bb0f3233205d68e12081fb6a90ce0429663a89f Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 9 Apr 2024 01:17:49 -0700 Subject: [PATCH] make if-none-match PUT/POST RFC compliant (#19448) fixes #19442 --- cmd/object-handlers-common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/object-handlers-common.go b/cmd/object-handlers-common.go index e84fd26ca..3feff7b68 100644 --- a/cmd/object-handlers-common.go +++ b/cmd/object-handlers-common.go @@ -185,7 +185,7 @@ func checkPreconditionsPUT(ctx context.Context, w http.ResponseWriter, r *http.R if isETagEqual(objInfo.ETag, ifNoneMatchETagHeader) { // If the object ETag matches with the specified ETag. writeHeaders() - w.WriteHeader(http.StatusNotModified) + writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrPreconditionFailed), r.URL) return true } }