Skip to content

Commit

Permalink
Remove Range header after Seek to origin (#1649)
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed May 4, 2022
1 parent 0836bb8 commit 1a65a83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api-get-object.go
Expand Up @@ -199,6 +199,9 @@ func (c *Client) GetObject(ctx context.Context, bucketName, objectName string, o
opts.SetRange(req.Offset, req.Offset+int64(len(req.Buffer))-1)
} else if req.Offset > 0 { // Range is set with respect to the offset.
opts.SetRange(req.Offset, 0)
} else {
// Remove range header if already set
delete(opts.headers, "Range")
}
httpReader, objectInfo, _, err = c.getObject(ctx, bucketName, objectName, opts)
if err != nil {
Expand Down

0 comments on commit 1a65a83

Please sign in to comment.