Skip to content

Commit

Permalink
Fix If-None-Match handling in GetManifest
Browse files Browse the repository at this point in the history
It was comparing the value of the header to an ETag that's always
empty.
  • Loading branch information
ronenh committed Nov 20, 2023
1 parent 2ab8a86 commit 8d3a812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/directory/v3/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (s *Model) GetManifest(req *dsm3.GetManifestRequest, stream dsm3.Model_GetM
}

inMD, _ := metadata.FromIncomingContext(stream.Context())
if lo.Contains(inMD.Get(headers.IfNoneMatch), md.Etag) {
if lo.Contains(inMD.Get(headers.IfNoneMatch), manifest.Metadata.Etag) {
return nil
}

Expand Down

0 comments on commit 8d3a812

Please sign in to comment.