Skip to content

Commit

Permalink
Merge pull request #3 from SiaFoundation/chris/fix-superfluous-header
Browse files Browse the repository at this point in the history
Fix superfluous header being returned on failed download
  • Loading branch information
peterjan authored Oct 3, 2023
2 parents 5b2c588 + 5e0304f commit 776c144
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gofakes3.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,11 @@ func (g *GoFakeS3) getObject(
obj.Range.writeHeader(obj.Size, w)

if _, err := io.Copy(w, obj.Contents); err != nil {
return err
// Log this failure but return 'nil'. We have already started sending
// data so we can't send an error response anymore anyway.
g.log.Print(LogErr, "error copying object contents", err)
return nil
}

return nil
}

Expand Down

0 comments on commit 776c144

Please sign in to comment.