mirror of
https://github.com/rclone/rclone.git
synced 2024-11-26 10:25:03 +01:00
swift: fix missing hash from object returned from upload
Before this fix we were reading the hash from the upload using the
string "ETag", however the go runtime normalises the tag into "Etag"
so we were in fact always reading an empty string.
This bug was introduced in
aeea4430d5
swift: efficiency: slim Object and reduce requests on upload
It was spotted by the integration tests.
The fix was just to use the canonical form "Etag" instead of "ETag".
This commit is contained in:
parent
e2816629d0
commit
9cc17cec9a
@ -1335,7 +1335,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
|||||||
// object has been safely uploaded
|
// object has been safely uploaded
|
||||||
o.lastModified = modTime
|
o.lastModified = modTime
|
||||||
o.size = size
|
o.size = size
|
||||||
o.md5 = rxHeaders["ETag"]
|
o.md5 = rxHeaders["Etag"]
|
||||||
o.contentType = contentType
|
o.contentType = contentType
|
||||||
o.headers = headers
|
o.headers = headers
|
||||||
if inCount != nil {
|
if inCount != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user