diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index b688904aa..dc5b45118 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -188,6 +188,10 @@ func (api objectAPIHandlers) SelectObjectContentHandler(w http.ResponseWriter, r isSuffixLength = true } + if length > 0 { + length-- + } + rs := &HTTPRangeSpec{ IsSuffixLength: isSuffixLength, Start: offset,