diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-26 12:32:12 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-26 12:32:12 +0000 |
commit | 66ab79e76aecc880ffd00704cb4abf63eb175ecd (patch) | |
tree | c4e6564f92170b71f24c7b91dcf9fbd5ddf07871 /lib/custodian/protocoltest/http.rb | |
parent | 90f223270012a85993029a03f80685bb7613458a (diff) |
Show failing lines.
Diffstat (limited to 'lib/custodian/protocoltest/http.rb')
-rw-r--r-- | lib/custodian/protocoltest/http.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index 18fb694..265c1ea 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -1,4 +1,4 @@ -require 'timeout' + # @@ -58,7 +58,7 @@ module Custodian @host = @url if ( @url !~ /^https?:/ ) - raise ArgumentError, "The target wasn't an URL" + raise ArgumentError, "The target wasn't an URL: #{line}" end # @@ -126,6 +126,7 @@ module Custodian c = Curl::Easy.new(@url) c.follow_location = true c.max_redirects = 10 + c.ssl_verify_host = false c.timeout = 20 c.perform @status = c.response_code @@ -140,7 +141,7 @@ module Custodian @error = "Too many redirections (more than 10)" return false rescue => x - @error = "Exception: #{x}" + @error = "Exception: #{x}" return false end end |