diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 9b671d0a0b..0074b62ec7 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -491,7 +491,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy end end - filename ||= content_disposition.filename + filename = content_disposition.filename if filename.blank? next if filename.blank? # Servers may include '/' in their Content-Disposition filename header. Take only the basename of this, because: