pull: fix polling code for Ruby 1.8.7 Net::HTTP (#191)
This commit is contained in:
parent
70096f8e91
commit
bf23ba1d1e
@ -518,9 +518,11 @@ module Homebrew
|
|||||||
# 401 error is normal while file is still in async publishing process
|
# 401 error is normal while file is still in async publishing process
|
||||||
url = URI(bottle_info.url)
|
url = URI(bottle_info.url)
|
||||||
puts "Verifying bottle: #{File.basename(url.path)}"
|
puts "Verifying bottle: #{File.basename(url.path)}"
|
||||||
Net::HTTP.start(url.host, url.port, :use_ssl => true) do |http|
|
http = Net::HTTP.new(url.host, url.port)
|
||||||
|
http.use_ssl = true
|
||||||
|
http.start do
|
||||||
while true do
|
while true do
|
||||||
req = Net::HTTP::Head.new url
|
req = Net::HTTP::Head.new bottle_info.url
|
||||||
res = http.request req
|
res = http.request req
|
||||||
retry_count += 1
|
retry_count += 1
|
||||||
if res.is_a?(Net::HTTPSuccess)
|
if res.is_a?(Net::HTTPSuccess)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user