1
mirror of https://github.com/rclone/rclone synced 2024-11-14 13:36:24 +01:00

quatrix: fix Content-Range header

This change does not actually affect uploads. Just to be right according to definition of Content-Range in
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range#range-end
This commit is contained in:
Volodymyr 2024-02-09 18:44:45 +02:00 committed by GitHub
parent 885a543023
commit 2abeda5961
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1201,7 +1201,8 @@ func (o *Object) upload(ctx context.Context, uploadKey string, chunk io.Reader,
Method: "POST",
RootURL: fmt.Sprintf(uploadURL, o.fs.opt.Host) + uploadKey,
Body: chunk,
ContentRange: fmt.Sprintf("bytes %d-%d/%d", offset, offset+chunkSize, fullSize),
ContentLength: &chunkSize,
ContentRange: fmt.Sprintf("bytes %d-%d/%d", offset, offset+chunkSize-1, fullSize),
Options: options,
}