Skip to content

Commit

Permalink
Revert "Revert "Merge pull request Homebrew#10898 from reitermarkus/a…
Browse files Browse the repository at this point in the history
…udit-timeout""

This reverts commit 0b8a9bc.
  • Loading branch information
reitermarkus committed Apr 3, 2021
1 parent 24c9b59 commit cdcd216
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Library/Homebrew/utils/curl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def curl_with_workarounds(

return result if result.success? || !args.exclude?("--http1.1")

raise Timeout::Error, result.stderr.chomp if result.status.exitstatus == 28
raise Timeout::Error, result.stderr.lines.last.chomp if timeout && result.status.exitstatus == 28

# Error in the HTTP2 framing layer
if result.status.exitstatus == 16
Expand Down Expand Up @@ -176,9 +176,12 @@ def curl_check_http_content(url, specs: {}, user_agents: [:default], check_conte
hash_needed = false
if url != secure_url
user_agents.each do |user_agent|
secure_details =
secure_details = begin
curl_http_content_headers_and_checksum(secure_url, specs: specs, hash_needed: true,
user_agent: user_agent)
rescue Timeout::Error
next
end

next unless http_status_ok?(secure_details[:status])

Expand Down

0 comments on commit cdcd216

Please sign in to comment.