fix(read): handle indexed ranges within the first encrypted block

Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
Feng Ruohang
2026-11-12 07:49:47 +08:00
parent 34ba7cc1ff
commit 7c0a99284f
2 changed files with 104 additions and 1 deletions
+1 -1
View File
@@ -916,7 +916,7 @@ func NewGetObjectReader(rs *HTTPRangeSpec, oi ObjectInfo, opts ObjectOptions, h
}
// Decompression reader.
var dopts []s2.ReaderOption
if off > 0 || decOff > 0 {
if off > 0 || decOff > 0 || decryptSkip > 0 {
// We are not starting at the beginning, so ignore stream identifiers.
dopts = append(dopts, s2.ReaderIgnoreStreamIdentifier())
}