Skip to content

Commit

Permalink
* Validation of payload digest
Browse files Browse the repository at this point in the history
* Reduced disk access
* Config option for default digest algorithm
  • Loading branch information
johnerikhalse committed Aug 26, 2021
1 parent 8682f71 commit dfc676c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ func (d digestFilterReader) Read(p []byte) (n int, err error) {
if n > 0 {
pp := p[:n]
for _, dd := range d.digests {
dd.Write(pp)
// OK to ignore error. The digest might be wrong, but client gets wanted data.
_, _ = dd.Write(pp)
}
}
return
Expand Down

0 comments on commit dfc676c

Please sign in to comment.