Fix Sparkle detection if content type is missing.
This commit is contained in:
		
							parent
							
								
									75eb6d1780
								
							
						
					
					
						commit
						71759035dd
					
				@ -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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user