aws-sdk-s3 1.152.0 → 1.152.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/client.rb +1 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +27 -16
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eca480261feb18667caab9e9a2d9a42ec638a31e8138a2b964ada46f30b5edf5
|
4
|
+
data.tar.gz: 480618739c88c10b9d14aa4e3ae9b4e4e726dd5956f2348ab48041f843967fc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24b80eaf7d528e22d201188b8868f6fb748cb5d0f3edd3e2fb134e80238b457db4b4b7cc58ea8f566534155a13ffd68c5e014fa6dfc9cddb4b7b00f2f37f32f6
|
7
|
+
data.tar.gz: 22da3b464bb18d71afdd9884a01f3c2b9e046004a3cecc9ea5dd9b7056abebb158b37574e5ca3e7882899f7437273909247c2884d451ab98ad59c8c60287962b
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.152.
|
1
|
+
1.152.1
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -18828,7 +18828,7 @@ module Aws::S3
|
|
18828
18828
|
params: params,
|
18829
18829
|
config: config)
|
18830
18830
|
context[:gem_name] = 'aws-sdk-s3'
|
18831
|
-
context[:gem_version] = '1.152.
|
18831
|
+
context[:gem_version] = '1.152.1'
|
18832
18832
|
Seahorse::Client::Request.new(handlers, context)
|
18833
18833
|
end
|
18834
18834
|
|
@@ -15,21 +15,40 @@ module Aws
|
|
15
15
|
|
16
16
|
def call(context)
|
17
17
|
@handler.call(context).on(200) do |response|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
+
def streaming_output?(output)
|
32
|
+
if (payload = output[:payload_member]) # checking ref and shape
|
33
|
+
payload['streaming'] || payload.shape['streaming'] ||
|
34
|
+
payload.eventstream
|
35
|
+
else
|
36
|
+
false
|
23
37
|
end
|
24
38
|
end
|
25
39
|
|
40
|
+
def members_in_body?(output)
|
41
|
+
output.shape.members.any? { |_, k| k.location.nil? }
|
42
|
+
end
|
43
|
+
|
26
44
|
def check_for_error(context)
|
27
45
|
xml = context.http_response.body_contents
|
28
|
-
if xml.match(
|
46
|
+
if xml.match(/\?>\s*<Error>/)
|
29
47
|
error_code = xml.match(/<Code>(.+?)<\/Code>/)[1]
|
30
48
|
error_message = xml.match(/<Message>(.+?)<\/Message>/)[1]
|
31
49
|
S3::Errors.error_class(error_code).new(context, error_message)
|
32
|
-
elsif !xml.match(/<\w/)
|
50
|
+
elsif members_in_body?(context.operation.output) && !xml.match(/<\w/)
|
51
|
+
# Must have a body member and have the start of an XML Tag
|
33
52
|
# Other incomplete xml bodies will result in XML ParsingError
|
34
53
|
Seahorse::Client::NetworkingError.new(
|
35
54
|
S3::Errors
|
@@ -40,15 +59,7 @@ module Aws
|
|
40
59
|
end
|
41
60
|
end
|
42
61
|
|
43
|
-
handler(
|
44
|
-
Handler,
|
45
|
-
step: :sign,
|
46
|
-
operations: [
|
47
|
-
:complete_multipart_upload,
|
48
|
-
:copy_object,
|
49
|
-
:upload_part_copy,
|
50
|
-
]
|
51
|
-
)
|
62
|
+
handler(Handler, step: :sign)
|
52
63
|
end
|
53
64
|
end
|
54
65
|
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.152.
|
4
|
+
version: 1.152.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: 2024-06-
|
11
|
+
date: 2024-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|