From 717966a65609cdd834175b92040bd75978b6ab20 Mon Sep 17 00:00:00 2001 From: "user.email" Date: Sat, 24 Oct 2026 22:45:19 -0700 Subject: [PATCH] test(volume_server): expect 200 for HEAD with mismatched If-None-Match The read handler evaluates If-None-Match before If-Modified-Since for both GET and HEAD, so a mismatched etag returns the full response, not 304. --- test/volume_server/http/read_path_variants_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/volume_server/http/read_path_variants_test.go b/test/volume_server/http/read_path_variants_test.go index 65df072211..e88fc166a7 100644 --- a/test/volume_server/http/read_path_variants_test.go +++ b/test/volume_server/http/read_path_variants_test.go @@ -198,8 +198,8 @@ func TestConditionalHeaderPrecedenceAndInvalidIfModifiedSince(t *testing.T) { headIMSPrecedenceReq.Header.Set("If-None-Match", "\"definitely-different-etag\"") headIMSPrecedenceResp := framework.DoRequest(t, client, headIMSPrecedenceReq) headIMSPrecedenceBody := framework.ReadAllAndClose(t, headIMSPrecedenceResp) - if headIMSPrecedenceResp.StatusCode != http.StatusNotModified { - t.Fatalf("HEAD conditional precedence expected 304 when If-Modified-Since matches, got %d", headIMSPrecedenceResp.StatusCode) + if headIMSPrecedenceResp.StatusCode != http.StatusOK { + t.Fatalf("HEAD mismatched If-None-Match overrides If-Modified-Since: expected 200, got %d", headIMSPrecedenceResp.StatusCode) } if len(headIMSPrecedenceBody) != 0 { t.Fatalf("HEAD conditional precedence expected empty body, got %d bytes", len(headIMSPrecedenceBody))