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 <d@eic.email>
This commit is contained in:
Sam Ford 2025-03-06 11:33:43 -05:00
parent 0ad3ae3ae5
commit 1ac70579eb
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D

View File

@ -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,