aws-sdk-s3 1.120.0 → 1.120.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0ecedb5029a9aae068dd207b987f29fafe9b30666926596c222af527a7534ec
4
- data.tar.gz: 8aa24e696aeb7b1615715b4601a472b623dc253f6737b8ad2d29524fb621e927
3
+ metadata.gz: 5bde370899f8f2845bc0e53a0a4abf88ee9468d03d0b3efeb8afce96243aef15
4
+ data.tar.gz: 12ca1d59946062e1b37145bbaad04c3f506558b347705f0327778b9f70b0b9e5
5
5
  SHA512:
6
- metadata.gz: 0bd1102fe8cedefa01adef46944e16446f7ca2a15faaf057dcbf1adce6fc69f017afa8cec52443590b4d9488846b1c1769204e388472ec949b2cca05d4990823
7
- data.tar.gz: 95b10eb395a66dca4d6067da1237c38e0da95bef1fd18226ea8aa19ce11ae61791d36d2edc487d9b89c35f4f855833de9c0b2817814cd34073681d64de98110b
6
+ metadata.gz: 8f0506278dc432adeb3210f474bb9d68d70451cb2755a2a1fffeef77e7b33053e22f9fececc0ab834212a9c3e3dd258384cddc66e897d2c36313c31e766202b4
7
+ data.tar.gz: 5258d9bf820de55517990fe9854a9d78be3712b91b58827b4f1c78a0fc2c785209aaa011d4cb2fed22e357d01380c19414b7bbb0026cf7e3bb3956c80df6020a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.120.1 (2023-04-05)
5
+ ------------------
6
+
7
+ * Issue - Skip `#check_for_cached_region` if custom endpoint provided
8
+
4
9
  1.120.0 (2023-03-31)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.120.0
1
+ 1.120.1
@@ -15436,7 +15436,7 @@ module Aws::S3
15436
15436
  params: params,
15437
15437
  config: config)
15438
15438
  context[:gem_name] = 'aws-sdk-s3'
15439
- context[:gem_version] = '1.120.0'
15439
+ context[:gem_version] = '1.120.1'
15440
15440
  Seahorse::Client::Request.new(handlers, context)
15441
15441
  end
15442
15442
 
@@ -52,7 +52,9 @@ module Aws
52
52
 
53
53
  def check_for_cached_region(context, bucket)
54
54
  cached_region = S3::BUCKET_REGIONS[bucket]
55
- if cached_region && cached_region != context.config.region
55
+ if cached_region &&
56
+ cached_region != context.config.region &&
57
+ !S3Signer.custom_endpoint?(context)
56
58
  context.http_request.endpoint.host = S3Signer.new_hostname(
57
59
  context, cached_region
58
60
  )
@@ -77,7 +79,7 @@ module Aws
77
79
  def handle_region_errors(response)
78
80
  if wrong_sigv4_region?(response) &&
79
81
  !fips_region?(response) &&
80
- !custom_endpoint?(response) &&
82
+ !S3Signer.custom_endpoint?(response.context) &&
81
83
  !expired_credentials?(response)
82
84
  get_region_and_retry(response.context)
83
85
  else
@@ -106,15 +108,6 @@ module Aws
106
108
  resp.context.http_response.body_contents.match(/<Code>ExpiredToken<\/Code>/)
107
109
  end
108
110
 
109
- def custom_endpoint?(resp)
110
- region = resp.context.config.region
111
- partition = Aws::Endpoints::Matchers.aws_partition(region)
112
- endpoint = resp.context.http_request.endpoint
113
-
114
- !endpoint.hostname.include?(partition['dnsSuffix']) &&
115
- !endpoint.hostname.include?(partition['dualStackDnsSuffix'])
116
- end
117
-
118
111
  def wrong_sigv4_region?(resp)
119
112
  resp.context.http_response.status_code == 400 &&
120
113
  (resp.context.http_response.headers['x-amz-bucket-region'] ||
@@ -168,6 +161,15 @@ module Aws
168
161
  context.config.endpoint_provider.resolve_endpoint(endpoint_params)
169
162
  URI(endpoint.url).host
170
163
  end
164
+
165
+ def custom_endpoint?(context)
166
+ region = context.config.region
167
+ partition = Aws::Endpoints::Matchers.aws_partition(region)
168
+ endpoint = context.http_request.endpoint
169
+
170
+ !endpoint.hostname.include?(partition['dnsSuffix']) &&
171
+ !endpoint.hostname.include?(partition['dualStackDnsSuffix'])
172
+ end
171
173
  end
172
174
  end
173
175
  end
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.120.0'
76
+ GEM_VERSION = '1.120.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.120.0
4
+ version: 1.120.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-03-31 00:00:00.000000000 Z
11
+ date: 2023-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms