From 1ac70579ebe55f81e525bf51a3838a3744eb0f7c Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Thu, 6 Mar 2025 11:33:43 -0500 Subject: [PATCH] Cask: skip livecheck https audit for POST requests We recently added `POST` request support to livecheck but related cask checks are failing the `livecheck_https_availability` audit because it calls `validate_url_for_https_availability` which calls `Utils::Curl.curl_check_http_content` and that checks the URL using a `GET` request. Adding `POST` request support to all of those methods will take some work, so this adds a guard to skip the audit if the `livecheck` block uses `post_form` or `post_json`. This isn't ideal but it will allow us to add these `livecheck` blocks in the interim time. Co-authored-by: Douglas Eichelberger --- Library/Homebrew/cask/audit.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 0a64100adc..8fe410a0d1 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -950,6 +950,9 @@ module Cask return unless (url = cask.livecheck.url) return if url.is_a?(Symbol) + options = cask.livecheck.options + return if options.post_form || options.post_json + validate_url_for_https_availability( url, "livecheck URL", check_content: true,