forked from TrueCloudLab/frostfs-s3-gw
[#125] Handle negative Content-Length on put
Add computing actual object size during calculating hash on put. Use this actual value to save in tree and cache Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
b445f7bbf9
commit
4a6e3a19ce
21 changed files with 105 additions and 70 deletions
|
@ -13,8 +13,8 @@ import (
|
|||
|
||||
const sizeToDetectType = 512
|
||||
|
||||
func getRangeToDetectContentType(maxSize int64) *layer.RangeParams {
|
||||
end := uint64(maxSize)
|
||||
func getRangeToDetectContentType(maxSize uint64) *layer.RangeParams {
|
||||
end := maxSize
|
||||
if sizeToDetectType < end {
|
||||
end = sizeToDetectType
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue