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:
parent
1bc174e8a7
commit
159ad05f8a
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue