1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Changes the path only if subdomain is not @host

see https://github.com/fog/fog/issues/1631#issuecomment-16396992
This commit is contained in:
Matthieu Huin 2013-04-16 10:50:30 +02:00
parent 1bc174e8a7
commit 159ad05f8a

View file

@ -329,10 +329,12 @@ DATA
if !valid_dns || @path_style
Fog::Logger.warning("fog: the specified s3 bucket name(#{subdomain}) is not a valid dns name, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html") unless valid_dns
params[:host] = params[:host].split("#{subdomain}.")[-1]
if params[:path]
params[:path] = "#{subdomain}/#{params[:path]}" unless subdomain == @host
else
params[:path] = subdomain
unless subdomain == @host
if params[:path]
params[:path] = "#{subdomain}/#{params[:path]}"
else
params[:path] = subdomain
end
end
subdomain = nil
end