diff options
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 5a86c0adf..17948ea2c 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -201,7 +201,7 @@ class FormulaAuditor      @specs = %w[stable devel head].map { |s| formula.send(s) }.compact    end -  def self.check_http_content(url, name, user_agents: [:default], check_content: false) +  def self.check_http_content(url, name, user_agents: [:default], check_content: false, strict: false)      return unless url.start_with? "http"      details = nil @@ -251,6 +251,8 @@ class FormulaAuditor        return "The URL #{url} should use HTTPS rather than HTTP"      end +    return unless strict +      # Same size, different content after normalization      # (typical causes: Generated ID, Timestamp, Unix time)      if details[:file].length == secure_details[:file].length @@ -590,7 +592,8 @@ class FormulaAuditor      if http_content_problem = FormulaAuditor.check_http_content(homepage,                                                 formula.name,                                                 user_agents: [:browser, :default], -                                               check_content: true) +                                               check_content: true, +                                               strict: @strict)        problem http_content_problem      end    end  | 
