From 0270bd9d2ac293c41fa5a5fde2f5afc0714aef85 Mon Sep 17 00:00:00 2001 From: Michel Rouly Date: Wed, 6 Aug 2025 11:45:53 -0700 Subject: [PATCH] handle false content_type --- Library/Homebrew/download_strategy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 5742a33183..12b1ff7e4f 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -468,7 +468,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy # The cached location is no longer fresh if either: # - Last-Modified value is newer than the file's timestamp # - Content-Length value is different than the file's size - if cached_location_valid && (content_type.nil? || !content_type.start_with?("text/")) + if cached_location_valid && (!content_type.is_a?(String) || !content_type.start_with?("text/")) if last_modified && last_modified > cached_location.mtime ohai "Ignoring #{cached_location}", "Cached modified time #{cached_location.mtime.iso8601} is before" \