aws 1.11.3 → 1.11.4
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.
- data/lib/awsbase/right_awsbase.rb +6 -3
- data/lib/right_aws.rb +1 -1
- data/lib/s3/right_s3_interface.rb +1 -1
- metadata +1 -1
@@ -222,8 +222,11 @@ module RightAws
|
|
222
222
|
@params[:service] ||= service_info[:default_service]
|
223
223
|
@params[:protocol] ||= service_info[:default_protocol]
|
224
224
|
end
|
225
|
-
|
226
|
-
|
225
|
+
if !@params[:multi_thread].nil? && @params[:connection_mode].nil? # user defined this
|
226
|
+
@params[:connection_mode] = @params[:multi_thread] ? :per_thread : :single
|
227
|
+
end
|
228
|
+
# @params[:multi_thread] ||= defined?(AWS_DAEMON)
|
229
|
+
@params[:connection_mode] ||= :default
|
227
230
|
@params[:connection_mode] = :per_request if @params[:connection_mode] == :default
|
228
231
|
@logger = @params[:logger]
|
229
232
|
@logger = RAILS_DEFAULT_LOGGER if !@logger && defined?(RAILS_DEFAULT_LOGGER)
|
@@ -259,7 +262,7 @@ module RightAws
|
|
259
262
|
function = function.to_sym
|
260
263
|
# get rid of requestId (this bad boy was added for API 2008-08-08+ and it is uniq for every response)
|
261
264
|
response = response.sub(%r{<requestId>.+?</requestId>}, '')
|
262
|
-
response_md5 =
|
265
|
+
response_md5 =Digest::MD5.hexdigest(response).to_s
|
263
266
|
# check for changes
|
264
267
|
unless @cache[function] && @cache[function][:response_md5] == response_md5
|
265
268
|
# well, the response is new, reset cache data
|
data/lib/right_aws.rb
CHANGED
@@ -80,7 +80,7 @@ module RightAws
|
|
80
80
|
s3_headers = {}
|
81
81
|
headers.each do |key, value|
|
82
82
|
key = key.downcase
|
83
|
-
s3_headers[key] = value.
|
83
|
+
s3_headers[key] = value.join( "" ).strip if key[/^#{AMAZON_HEADER_PREFIX}|^content-md5$|^content-type$|^date$/o]
|
84
84
|
end
|
85
85
|
s3_headers['content-type'] ||= ''
|
86
86
|
s3_headers['content-md5'] ||= ''
|