Fix code style.
This commit is contained in:
parent
cf40f7b8f6
commit
82535696fa
@ -23,10 +23,10 @@ module Homebrew
|
|||||||
def self.match?(url)
|
def self.match?(url)
|
||||||
return false unless url.match?(%r{^https?://})
|
return false unless url.match?(%r{^https?://})
|
||||||
|
|
||||||
xml = url.end_with?('.xml')
|
xml = url.end_with?(".xml")
|
||||||
xml ||= begin
|
xml ||= begin
|
||||||
headers = Strategy.page_headers(url)
|
headers = Strategy.page_headers(url)
|
||||||
content_type = headers["content-type"]&.split(';', 2)&.first
|
content_type = headers["content-type"]&.split(";", 2)&.first
|
||||||
["application/xml", "text/xml"].include?(content_type)
|
["application/xml", "text/xml"].include?(content_type)
|
||||||
end
|
end
|
||||||
return false unless xml
|
return false unless xml
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user