aws-sdk 1.43.1 → 1.43.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws/core/http/net_http_handler.rb +16 -19
- data/lib/aws/core/query_request_builder.rb +1 -1
- data/lib/aws/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 489fe0285453706d944f5d6d8288178ea6dddce5
|
4
|
+
data.tar.gz: 4c309426eda2dec63f5038d92df167d76e6df233
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7177ec3b944e1eda7180f1648676abb8e9e492d79c5edbeec33be3a1d6cbc0e27fb6cac470ca23923579a6729e16d7d278e6db74e07408cbd1150ac67fb16ff4
|
7
|
+
data.tar.gz: f778a8249d8b2404f13f728de55408a5ba3306d6bc04a0ed1f711dfcc4a966f95398e11dba3866f1a87cb38acc5ea8919744895fb7cf571b34827cb7fa4a0b85
|
@@ -58,33 +58,30 @@ module AWS
|
|
58
58
|
http.continue_timeout = request.continue_timeout if
|
59
59
|
http.respond_to?(:continue_timeout=)
|
60
60
|
|
61
|
+
exp_length = nil
|
62
|
+
act_length = 0
|
61
63
|
http.request(build_net_http_request(request)) do |net_http_resp|
|
62
64
|
response.status = net_http_resp.code.to_i
|
63
65
|
response.headers = net_http_resp.to_hash
|
64
66
|
exp_length = determine_expected_content_length(response)
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
ensure
|
73
|
-
retry_possible = false
|
74
|
-
end
|
67
|
+
if block_given? and response.status < 300
|
68
|
+
net_http_resp.read_body do |data|
|
69
|
+
begin
|
70
|
+
act_length += data.bytesize
|
71
|
+
yield data unless data.empty?
|
72
|
+
ensure
|
73
|
+
retry_possible = false
|
75
74
|
end
|
76
|
-
else
|
77
|
-
response.body = net_http_resp.read_body
|
78
|
-
act_length += response.body.bytesize unless response.body.nil?
|
79
|
-
end
|
80
|
-
ensure
|
81
|
-
run_check = exp_length.nil? == false && request.http_method != "HEAD" && @verify_content_length
|
82
|
-
if run_check && act_length != exp_length
|
83
|
-
raise TruncatedBodyError, 'content-length does not match'
|
84
75
|
end
|
76
|
+
else
|
77
|
+
response.body = net_http_resp.read_body
|
78
|
+
act_length += response.body.bytesize unless response.body.nil?
|
85
79
|
end
|
86
80
|
end
|
87
|
-
|
81
|
+
run_check = exp_length && request.http_method != "HEAD" && @verify_content_length
|
82
|
+
if run_check && act_length != exp_length
|
83
|
+
raise TruncatedBodyError, 'content-length does not match'
|
84
|
+
end
|
88
85
|
end
|
89
86
|
|
90
87
|
rescue *NETWORK_ERRORS => error
|
@@ -25,7 +25,7 @@ module AWS
|
|
25
25
|
|
26
26
|
def populate_request request, options
|
27
27
|
|
28
|
-
now = Time.now.utc.strftime('%Y-%m-%dT%H:%M:%
|
28
|
+
now = Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ')
|
29
29
|
|
30
30
|
request.headers['Content-Type'] =
|
31
31
|
"application/x-www-form-urlencoded; charset=utf-8"
|
data/lib/aws/version.rb
CHANGED