Merge pull request #3307 from evertrue/evertrue/eherot/do_not_unnecessarily_throw_path_style_warning
Do not throw a warning about falling back to path_style
This commit is contained in:
commit
ccf96e75a1
|
@ -220,13 +220,15 @@ module Fog
|
||||||
bucket_name = params[:bucket_name]
|
bucket_name = params[:bucket_name]
|
||||||
|
|
||||||
path_style = params.fetch(:path_style, @path_style)
|
path_style = params.fetch(:path_style, @path_style)
|
||||||
if !path_style && COMPLIANT_BUCKET_NAMES !~ bucket_name
|
if !path_style
|
||||||
|
if COMPLIANT_BUCKET_NAMES !~ bucket_name
|
||||||
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) is not a valid dns name, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html")
|
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) is not a valid dns name, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html")
|
||||||
path_style = true
|
path_style = true
|
||||||
elsif scheme == 'https' && bucket_name =~ /\./
|
elsif scheme == 'https' && bucket_name =~ /\./
|
||||||
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) contains a '.' so is not accessible over https as a virtual hosted bucket, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html")
|
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) contains a '.' so is not accessible over https as a virtual hosted bucket, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html")
|
||||||
path_style = true
|
path_style = true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if path_style
|
if path_style
|
||||||
path = bucket_to_path bucket_name, path
|
path = bucket_to_path bucket_name, path
|
||||||
|
|
Loading…
Reference in New Issue