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 } }