mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 09:04:52 +01:00
Fix transfer issue with gzip payloads
This commit is contained in:
parent
b9727cc6ab
commit
d3bab98390
@ -363,7 +363,14 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadClo
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if bytes == nil {
|
||||
// Must set these as "defaults" since the HTTP payload is compressed and the handler will decompress by default,
|
||||
// otherwise we end up with a file size and hash mismatch
|
||||
o.bytes = -1
|
||||
o.md5 = ""
|
||||
} else {
|
||||
o.bytes = *bytes
|
||||
}
|
||||
return resp.HTTPResponse().Body, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user