summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/protocoltest/http.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb
index ad9e88d..18fb694 100644
--- a/lib/custodian/protocoltest/http.rb
+++ b/lib/custodian/protocoltest/http.rb
@@ -125,7 +125,7 @@ module Custodian
begin
c = Curl::Easy.new(@url)
c.follow_location = true
- c.max_redirects = 5
+ c.max_redirects = 10
c.timeout = 20
c.perform
@status = c.response_code
@@ -136,6 +136,9 @@ module Custodian
rescue Curl::Err::TimeoutError
@error = "Timed out fetching page."
return false
+ rescue Curl::Err::TooManyRedirectsError
+ @error = "Too many redirections (more than 10)"
+ return false
rescue => x
@error = "Exception: #{x}"
return false