Skip to content

Commit

Permalink
Referrer API must return correct Content-Type (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireW committed Jul 2, 2024
1 parent 1b4e407 commit 9915a85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/v1/remote/referrers.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (f *fetcher) fetchReferrers(ctx context.Context, filter map[string]string,
}

var b []byte
if resp.StatusCode == http.StatusOK {
if resp.StatusCode == http.StatusOK && resp.Header.Get("Content-Type") == string(types.OCIImageIndex) {
b, err = io.ReadAll(resp.Body)
if err != nil {
return nil, err
Expand Down

0 comments on commit 9915a85

Please sign in to comment.