Skip to content

Commit

Permalink
clairctl: fix error reporting for streaming responses
Browse files Browse the repository at this point in the history
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Apr 25, 2022
1 parent e166465 commit f0d6a35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/clairctl/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (c *Client) IndexReport(ctx context.Context, id claircore.Digest, m *clairc
}
var rd io.Reader
switch {
case res.ContentLength < 32+9:
case res.ContentLength > 0 && res.ContentLength < 32+9:
// Less than the size of the digest representation, something's up.
var buf bytes.Buffer
// Ignore error, because what would we do with it here?
Expand Down

0 comments on commit f0d6a35

Please sign in to comment.