mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Modify url regexp to handle periods in bucket names
This commit is contained in:
parent
1d866ac238
commit
62f8c32cef
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ module Fog
|
||||||
unless object_name
|
unless object_name
|
||||||
raise ArgumentError.new('object_name is required')
|
raise ArgumentError.new('object_name is required')
|
||||||
end
|
end
|
||||||
host, path = if bucket_name =~ /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\.(?![\.\-])|\-(?![\.])){1,61}[a-z0-9]$/
|
host, path = if bucket_name =~ /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\-(?![\.])){1,61}[a-z0-9]$/
|
||||||
["#{bucket_name}.#{@host}", object_name]
|
["#{bucket_name}.#{@host}", object_name]
|
||||||
else
|
else
|
||||||
[@host, "#{bucket_name}/#{object_name}"]
|
[@host, "#{bucket_name}/#{object_name}"]
|
||||||
|
|
Loading…
Reference in a new issue