mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #11782 from yahavi/undefined-delete-if
Error raised when no headers defined in curl download
This commit is contained in:
commit
008c4759c6
@ -391,7 +391,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
|||||||
resolved_url, _, url_time, _, is_redirection =
|
resolved_url, _, url_time, _, is_redirection =
|
||||||
resolve_url_basename_time_file_size(url, timeout: end_time&.remaining!)
|
resolve_url_basename_time_file_size(url, timeout: end_time&.remaining!)
|
||||||
# Authorization is no longer valid after redirects
|
# Authorization is no longer valid after redirects
|
||||||
meta[:headers].delete_if { |header| header.first&.start_with?("Authorization") } if is_redirection
|
meta[:headers]&.delete_if { |header| header.first&.start_with?("Authorization") } if is_redirection
|
||||||
|
|
||||||
fresh = if cached_location.exist? && url_time
|
fresh = if cached_location.exist? && url_time
|
||||||
url_time <= cached_location.mtime
|
url_time <= cached_location.mtime
|
||||||
|
Loading…
x
Reference in New Issue
Block a user