Strategy: Pass --max-redirs to #curl_headers

The default curl args in `#curl_headers` cover most of
`Livecheck::Strategy::DEFAULT_CURL_ARGS` but `--max-redirs` was
overlooked. This adds an explicit `--max-redirs` argument in
the `#page_headers` `#curl_headers` call but it's worth mentioning
that this approach wouldn't benefit from any changes in
`DEFAULT_CURL_ARGS` and would need to be manually kept in parity.
This commit is contained in:
Sam Ford 2023-05-15 13:14:13 -04:00
parent 64259a420b
commit bcddf99838
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D

View File

@ -184,6 +184,8 @@ module Homebrew
[:default, :browser].each do |user_agent|
begin
parsed_output = curl_headers(
"--max-redirs",
MAX_REDIRECTIONS.to_s,
url,
wanted_headers: ["location", "content-disposition"],
use_homebrew_curl: homebrew_curl,