s3: fix --s3-no-head panic: reflect: Elem of invalid type s3.PutObjectInput
In
22abd785eb
s3: implement reading and writing of metadata #111
The reading information of objects was refactored to use the
s3.HeadObjectOutput structure.
Unfortunately the code branch with `--s3-no-head` was not tested
otherwise this panic would have been discovered.
This shows that this is path is not integration tested, so this adds a
new integration test.
Fixes #6322
This commit is contained in:
parent
a047d30eca
commit
440d0cd179
2 changed files with 19 additions and 1 deletions
|
@ -4570,7 +4570,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
|||
// uploaded properly. If size < 0 then we need to do the HEAD.
|
||||
if o.fs.opt.NoHead && size >= 0 {
|
||||
var head s3.HeadObjectOutput
|
||||
structs.SetFrom(&head, req)
|
||||
structs.SetFrom(&head, &req)
|
||||
head.ETag = &md5sumHex // doesn't matter quotes are misssing
|
||||
head.ContentLength = &size
|
||||
// If we have done a single part PUT request then we can read these
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue