mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Fix s3zip not returning data (#13442)
We do not reliably know the length of compressed data, including headers. Request until the end-of-stream. Results will still be properly truncated. Fixes #13441
This commit is contained in:
@@ -173,7 +173,8 @@ func (api objectAPIHandlers) getObjectInArchiveFileHandler(ctx context.Context,
|
||||
var rc io.ReadCloser
|
||||
|
||||
if file.UncompressedSize64 > 0 {
|
||||
rs := &HTTPRangeSpec{Start: file.Offset, End: file.Offset + int64(file.UncompressedSize64) - 1}
|
||||
// We do not know where the file ends, but the returned reader only returns UncompressedSize.
|
||||
rs := &HTTPRangeSpec{Start: file.Offset, End: -1}
|
||||
gr, err := objectAPI.GetObjectNInfo(ctx, bucket, zipPath, rs, nil, readLock, opts)
|
||||
if err != nil {
|
||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||
|
||||
Reference in New Issue
Block a user