mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Allow for AWS errors not specifying region
This commit is contained in:
parent
18d86f822c
commit
29fbda675f
1 changed files with 1 additions and 1 deletions
|
@ -554,7 +554,7 @@ module Fog
|
|||
new_params[:bucket_name] = %r{<Bucket>([^<]*)</Bucket>}.match(body).captures.first
|
||||
new_params[:host] = %r{<Endpoint>([^<]*)</Endpoint>}.match(body).captures.first
|
||||
# some errors provide it directly
|
||||
@new_region = %r{<Region>([^<]*)</Region>}.match(body).captures.first
|
||||
@new_region = %r{<Region>([^<]*)</Region>}.match(body) ? Regexp.last_match.captures.first : nil
|
||||
end
|
||||
Fog::Logger.warning("fog: followed redirect to #{host}, connecting to the matching region will be more performant")
|
||||
original_region, original_signer = @region, @signer
|
||||
|
|
Loading…
Add table
Reference in a new issue