aws-sdk-s3 1.152.2 → 1.153.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/client.rb +6 -3
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bee37dd7ec7f97c9b9ffb9eb7a5d43c69798f1d715099e9715db1ba957778987
|
4
|
+
data.tar.gz: 8f88d0f09f2aeb133bfb2950aadaba613f21dd7c882f940062a612f29d6a1f3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d88db6d41c469d3bb5b3c855298f270597395e8ae8d7f95ac1667ae4aba66087266c5dc6dc20ff40864ec4b5f57915590b552eea8b59d6a7e3eeefb8532ebfb2
|
7
|
+
data.tar.gz: 3efeb4804e760352f95fcd0c819ca9a9fb0ea907c50fc3b26bf4c7aa34a9f081d74a5be59779ebd62aa30fe57251677305a4deffe75821440c87706b32badc4a
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.153.0 (2024-06-24)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.152.3 (2024-06-13)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Issue - Handle 200 errors for all S3 operations that do not have streaming responses.
|
13
|
+
|
4
14
|
1.152.2 (2024-06-12)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.153.0
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -131,6 +131,11 @@ module Aws::S3
|
|
131
131
|
|
132
132
|
# @overload initialize(options)
|
133
133
|
# @param [Hash] options
|
134
|
+
#
|
135
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
136
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
137
|
+
# class name or an instance of a plugin class.
|
138
|
+
#
|
134
139
|
# @option options [required, Aws::CredentialProvider] :credentials
|
135
140
|
# Your AWS credentials. This can be an instance of any one of the
|
136
141
|
# following classes:
|
@@ -271,7 +276,6 @@ module Aws::S3
|
|
271
276
|
# 'https://example.com'
|
272
277
|
# 'http://example.com:123'
|
273
278
|
#
|
274
|
-
#
|
275
279
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
276
280
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
277
281
|
# for endpoint discovery enabled operations. Defaults to 1000.
|
@@ -386,7 +390,6 @@ module Aws::S3
|
|
386
390
|
# throttling. This is a provisional mode that may change behavior
|
387
391
|
# in the future.
|
388
392
|
#
|
389
|
-
#
|
390
393
|
# @option options [Boolean] :s3_disable_multiregion_access_points (false)
|
391
394
|
# When set to `false` this will option will raise errors when multi-region
|
392
395
|
# access point ARNs are used. Multi-region access points can potentially
|
@@ -18828,7 +18831,7 @@ module Aws::S3
|
|
18828
18831
|
params: params,
|
18829
18832
|
config: config)
|
18830
18833
|
context[:gem_name] = 'aws-sdk-s3'
|
18831
|
-
context[:gem_version] = '1.
|
18834
|
+
context[:gem_version] = '1.153.0'
|
18832
18835
|
Seahorse::Client::Request.new(handlers, context)
|
18833
18836
|
end
|
18834
18837
|
|
@@ -15,22 +15,67 @@ module Aws
|
|
15
15
|
|
16
16
|
def call(context)
|
17
17
|
@handler.call(context).on(200) do |response|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
return response if streaming_output?(context.operation.output)
|
19
|
+
|
20
|
+
error = check_for_error(context)
|
21
|
+
return response unless error
|
22
|
+
|
23
|
+
context.http_response.status_code = 500
|
24
|
+
response.data = nil
|
25
|
+
response.error = error
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
# Streaming outputs are not subject to 200 errors.
|
32
|
+
def streaming_output?(output)
|
33
|
+
if (payload = output[:payload_member])
|
34
|
+
# checking ref and shape
|
35
|
+
payload['streaming'] || payload.shape['streaming'] ||
|
36
|
+
payload.eventstream
|
37
|
+
else
|
38
|
+
false
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Checks if the output shape is a structure shape and has members that
|
43
|
+
# are in the body for the case of a payload and a normal structure. A
|
44
|
+
# non-structure shape will not have members in the body. In the case
|
45
|
+
# of a string or blob, the body contents would have been checked first
|
46
|
+
# before this method is called in incomplete_xml_body?.
|
47
|
+
def members_in_body?(output)
|
48
|
+
shape =
|
49
|
+
if output[:payload_member]
|
50
|
+
output[:payload_member].shape
|
51
|
+
else
|
52
|
+
output.shape
|
22
53
|
end
|
54
|
+
|
55
|
+
if structure_shape?(shape)
|
56
|
+
shape.members.any? { |_, k| k.location.nil? }
|
57
|
+
else
|
58
|
+
false
|
23
59
|
end
|
24
60
|
end
|
25
61
|
|
62
|
+
def structure_shape?(shape)
|
63
|
+
shape.is_a?(Seahorse::Model::Shapes::StructureShape)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Must have a member in the body and have the start of an XML Tag.
|
67
|
+
# Other incomplete xml bodies will result in an XML ParsingError.
|
68
|
+
def incomplete_xml_body?(xml, output)
|
69
|
+
members_in_body?(output) && !xml.match(/<\w/)
|
70
|
+
end
|
71
|
+
|
26
72
|
def check_for_error(context)
|
27
73
|
xml = context.http_response.body_contents
|
28
|
-
if xml.match(
|
74
|
+
if xml.match(/\?>\s*<Error>/)
|
29
75
|
error_code = xml.match(/<Code>(.+?)<\/Code>/)[1]
|
30
76
|
error_message = xml.match(/<Message>(.+?)<\/Message>/)[1]
|
31
77
|
S3::Errors.error_class(error_code).new(context, error_message)
|
32
|
-
elsif
|
33
|
-
# Other incomplete xml bodies will result in XML ParsingError
|
78
|
+
elsif incomplete_xml_body?(xml, context.operation.output)
|
34
79
|
Seahorse::Client::NetworkingError.new(
|
35
80
|
S3::Errors
|
36
81
|
.error_class('InternalError')
|
@@ -40,15 +85,7 @@ module Aws
|
|
40
85
|
end
|
41
86
|
end
|
42
87
|
|
43
|
-
handler(
|
44
|
-
Handler,
|
45
|
-
step: :sign,
|
46
|
-
operations: [
|
47
|
-
:complete_multipart_upload,
|
48
|
-
:copy_object,
|
49
|
-
:upload_part_copy,
|
50
|
-
]
|
51
|
-
)
|
88
|
+
handler(Handler, step: :sign)
|
52
89
|
end
|
53
90
|
end
|
54
91
|
end
|
data/lib/aws-sdk-s3.rb
CHANGED
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.
|
4
|
+
version: 1.153.0
|
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: 2024-06-
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: '3'
|
48
48
|
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 3.
|
50
|
+
version: 3.198.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: '3'
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 3.
|
60
|
+
version: 3.198.0
|
61
61
|
description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
|
62
62
|
This gem is part of the AWS SDK for Ruby.
|
63
63
|
email:
|