fix(s3): throw error is content length is missing (fix #3394)

pull/2964/merge
Aaron Liu 2 days ago
parent 8acc57420a
commit 9792a5c84f

@ -422,6 +422,10 @@ func (handler *Driver) Meta(ctx context.Context, path string) (*MetaData, error)
return nil, err
}
if res == nil || res.ContentLength == nil {
return nil, errors.New("invalid response from S3: missing ContentLength")
}
etag := ""
if res.ETag != nil {
etag = *res.ETag

Loading…
Cancel
Save