diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 73068d760e..9b671d0a0b 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -492,7 +492,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy end filename ||= content_disposition.filename - next if filename.nil? + next if filename.blank? # Servers may include '/' in their Content-Disposition filename header. Take only the basename of this, because: # - Unpacking code assumes this is a single file - not something living in a subdirectory.