Fix Sparkle detection if content type is missing.

This commit is contained in:
Markus Reiter 2020-12-15 20:30:56 +01:00 committed by Sam Ford
parent 75eb6d1780
commit 71759035dd
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -26,8 +26,8 @@ module Homebrew
xml = url.end_with?(".xml")
xml ||= begin
headers = Strategy.page_headers(url)
content_type = headers["content-type"]&.split(";", 2)&.first
["application/xml", "text/xml"].include?(content_type)
content_type = headers["content-type"]
content_type.blank? || content_type.include?("xml")
end
return false unless xml