aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Janke2016-05-03 10:30:01 -0400
committerAndrew Janke2016-05-03 10:30:01 -0400
commitbf23ba1d1e3141ce99f6546053d7ce2249031179 (patch)
treecc5bd8467ac0116fcf697583b8c1b1a0bd26c78f
parent70096f8e919aa7d14234dc934d8ab30a5c946f59 (diff)
downloadbrew-bf23ba1d1e3141ce99f6546053d7ce2249031179.tar.bz2
pull: fix polling code for Ruby 1.8.7 Net::HTTP (#191)
-rw-r--r--Library/Homebrew/cmd/pull.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb
index 38f6993ef..14a7df5c9 100644
--- a/Library/Homebrew/cmd/pull.rb
+++ b/Library/Homebrew/cmd/pull.rb
@@ -518,9 +518,11 @@ module Homebrew
# 401 error is normal while file is still in async publishing process
url = URI(bottle_info.url)
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
- req = Net::HTTP::Head.new url
+ req = Net::HTTP::Head.new bottle_info.url
res = http.request req
retry_count += 1
if res.is_a?(Net::HTTPSuccess)