forked from TrueCloudLab/frostfs-s3-gw
[#219] Return ETag in quotes
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
406075aebb
commit
b28ecef43b
17 changed files with 97 additions and 57 deletions
|
@ -93,9 +93,17 @@ type PartInfo struct {
|
|||
|
||||
// ToHeaderString form short part representation to use in S3-Completed-Parts header.
|
||||
func (p *PartInfo) ToHeaderString() string {
|
||||
// ETag value contains SHA256 checksum which is used while getting object parts attributes.
|
||||
return strconv.Itoa(p.Number) + "-" + strconv.FormatUint(p.Size, 10) + "-" + p.ETag
|
||||
}
|
||||
|
||||
func (p *PartInfo) GetETag(md5Enabled bool) string {
|
||||
if md5Enabled && len(p.MD5) > 0 {
|
||||
return p.MD5
|
||||
}
|
||||
return p.ETag
|
||||
}
|
||||
|
||||
// LockInfo is lock information to create appropriate tree node.
|
||||
type LockInfo struct {
|
||||
id uint64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue