From 173284903b6b43bf59bc6128d29bdaec83b438fc Mon Sep 17 00:00:00 2001 From: mailsmail <78419644+mailsmail@users.noreply.github.com> Date: Sat, 20 Feb 2021 08:55:28 +0700 Subject: [PATCH] fix incorrect http range in SelectObjectContentHandler (#11585) --- cmd/object-handlers.go | 4 ++++ 1 file changed, 4 insertions(+) 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,