mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Remove --request GET
workaround for HEAD requests.
This commit is contained in:
parent
6dcf028b98
commit
c876530eff
@ -464,7 +464,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
output, _, _status = curl_output(
|
output, _, _status = curl_output(
|
||||||
"--location", "--silent", "--head", "--request", "GET", url.to_s,
|
"--location", "--silent", "--head", url.to_s,
|
||||||
timeout: timeout
|
timeout: timeout
|
||||||
)
|
)
|
||||||
parsed_output = parse_curl_output(output)
|
parsed_output = parse_curl_output(output)
|
||||||
|
@ -59,8 +59,6 @@ module Homebrew
|
|||||||
PAGE_HEADERS_CURL_ARGS = ([
|
PAGE_HEADERS_CURL_ARGS = ([
|
||||||
# We only need the response head (not the body)
|
# We only need the response head (not the body)
|
||||||
"--head",
|
"--head",
|
||||||
# Some servers may not allow a HEAD request, so we use GET
|
|
||||||
"--request", "GET"
|
|
||||||
] + DEFAULT_CURL_ARGS).freeze
|
] + DEFAULT_CURL_ARGS).freeze
|
||||||
|
|
||||||
# `curl` arguments used in `Strategy#page_content` method.
|
# `curl` arguments used in `Strategy#page_content` method.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user