Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

zoho: fix downloads with Range: header returning the wrong data

Nick Craig-Wood4f8dab8bcec4
diff --git a/backend/zoho/zoho.go b/backend/zoho/zoho.go
index 25b5d24af..d1172fe98 100644
--- a/backend/zoho/zoho.go
+++ b/backend/zoho/zoho.go
@@ -1206,7 +1206,7 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
if err != nil {
return nil, err
}
- if partialContent && resp.StatusCode == 200 {
+ if partialContent && resp.StatusCode == 200 && resp.Header.Get("Content-Range") == "" {
if start > 0 {
// We need to read and discard the beginning of the data...
_, err = io.CopyN(io.Discard, resp.Body, start)