aws-sdk-s3 1.123.0 → 1.123.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bce7e3809967ffcc0162974361501c6d816e367767032d31c4fa1dd90ca7542
4
- data.tar.gz: 9ec29e833cbd5b4506da1b40b070a764b4925c056414bac68a33b008bbe1ab0a
3
+ metadata.gz: 18c5a3063c80c67d11fcb593d262d3eb15b88edf2c25abdaaff2f12c57620274
4
+ data.tar.gz: b5a6e05f048778f72ca6f34947b4e7b4ed318a447d271764df129dc9e7bcdda3
5
5
  SHA512:
6
- metadata.gz: f3d113f0edcb793cb22503c4ddcfebd563b7b141652ae70a6471e4bb96e0906453767806bf8a36343f9732f4be1d3070eac1c901222cb3246b82c956ddc8179c
7
- data.tar.gz: 918bc83ab79e362b3cfd7ec4ee3a4d701b6c59ca0474811fe1011d9e2b100cc6c8bd583f5fcf887ca8311dcb6c6365ffed851acd06f3eec99732b210e78e8e3b
6
+ metadata.gz: f09b9adb0fcb1c14e974c482737bce5017377c9b7771f61e3330681a1094a42055edc2727f934e70d1097474163cc98bc2042a2a6880135c2bf9ac97ba5bb88f
7
+ data.tar.gz: c702479639bb64d638874d05477aa34b3581f3560f573ebd5acaea3d5e272bafd27ba3a491260ddb6697b450a5efaaf240c6699d2c87072b4ccc2f75b6ab00dc
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.123.1 (2023-06-02)
5
+ ------------------
6
+
7
+ * Issue - Fix multipart `download_file` so that it does not download bytes out of range (#2859).
8
+
4
9
  1.123.0 (2023-05-31)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.123.0
1
+ 1.123.1
@@ -15601,7 +15601,7 @@ module Aws::S3
15601
15601
  params: params,
15602
15602
  config: config)
15603
15603
  context[:gem_name] = 'aws-sdk-s3'
15604
- context[:gem_version] = '1.123.0'
15604
+ context[:gem_version] = '1.123.1'
15605
15605
  Seahorse::Client::Request.new(handlers, context)
15606
15606
  end
15607
15607
 
@@ -58,15 +58,19 @@ module Aws
58
58
  resp = @client.head_object(@params.merge(part_number: 1))
59
59
  count = resp.parts_count
60
60
  if count.nil? || count <= 1
61
- resp.content_length < MIN_CHUNK_SIZE ?
62
- single_request :
61
+ if resp.content_length <= MIN_CHUNK_SIZE
62
+ single_request
63
+ else
63
64
  multithreaded_get_by_ranges(construct_chunks(resp.content_length))
65
+ end
64
66
  else
65
67
  # partNumber is an option
66
68
  resp = @client.head_object(@params)
67
- resp.content_length < MIN_CHUNK_SIZE ?
68
- single_request :
69
+ if resp.content_length <= MIN_CHUNK_SIZE
70
+ single_request
71
+ else
69
72
  compute_mode(resp.content_length, count)
73
+ end
70
74
  end
71
75
  end
72
76
 
@@ -84,10 +88,11 @@ module Aws
84
88
  offset = 0
85
89
  default_chunk_size = compute_chunk(file_size)
86
90
  chunks = []
87
- while offset <= file_size
91
+ while offset < file_size
88
92
  progress = offset + default_chunk_size
89
- chunks << "bytes=#{offset}-#{progress < file_size ? progress : file_size}"
90
- offset = progress + 1
93
+ progress = file_size if progress > file_size
94
+ chunks << "bytes=#{offset}-#{progress - 1}"
95
+ offset = progress
91
96
  end
92
97
  chunks
93
98
  end
@@ -96,12 +101,9 @@ module Aws
96
101
  if @chunk_size && @chunk_size > file_size
97
102
  raise ArgumentError, ":chunk_size shouldn't exceed total file size."
98
103
  else
99
- chunk_size = @chunk_size || [
100
- (file_size.to_f / MAX_PARTS).ceil,
101
- MIN_CHUNK_SIZE
104
+ @chunk_size || [
105
+ (file_size.to_f / MAX_PARTS).ceil, MIN_CHUNK_SIZE
102
106
  ].max.to_i
103
- chunk_size -= 1 if file_size % chunk_size == 1
104
- chunk_size
105
107
  end
106
108
  end
107
109
 
data/lib/aws-sdk-s3.rb CHANGED
@@ -73,6 +73,6 @@ require_relative 'aws-sdk-s3/event_streams'
73
73
  # @!group service
74
74
  module Aws::S3
75
75
 
76
- GEM_VERSION = '1.123.0'
76
+ GEM_VERSION = '1.123.1'
77
77
 
78
78
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.123.0
4
+ version: 1.123.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms