Fix nil host in remotable (#8508)
Host can be nil in urls like 'https:https://example.com/path/file.png'
This commit is contained in:
parent
cc26fd71ac
commit
5b2b493a90
2 changed files with 13 additions and 2 deletions
|
@ -18,7 +18,7 @@ module Remotable
|
|||
return
|
||||
end
|
||||
|
||||
return if !%w(http https).include?(parsed_url.scheme) || parsed_url.host.empty? || self[attribute_name] == url
|
||||
return if !%w(http https).include?(parsed_url.scheme) || parsed_url.host.blank? || self[attribute_name] == url
|
||||
|
||||
begin
|
||||
Request.new(:get, url).perform do |response|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue