make if-none-match PUT/POST RFC compliant (#19448)

fixes #19442
This commit is contained in:
Harshavardhana
2024-04-09 01:17:49 -07:00
committed by GitHub
parent c6f8dc431e
commit 7bb0f32332

View File

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