This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new c26078e Allow for DNS error etc
c26078e is described below
commit c26078efe801ea59e5277600f54c48ebff5aa23b
Author: Sebb <[email protected]>
AuthorDate: Mon Jul 12 23:20:38 2021 +0100
Allow for DNS error etc
---
tools/download_check.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/download_check.rb b/tools/download_check.rb
index dda3bb6..7cde947 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -189,11 +189,11 @@ end
# Check page exists => response or nil
def check_head(path, severity = :E, log=true)
response = HEAD(path)
- code = response.code || '?'
+ code = (response.code || '?') rescue response.to_s
if code == '403' # someone does not like Whimsy?
W "HEAD #{path} - HTTP status: #{code} - retry"
response = HEAD(path)
- code = response.code || '?'
+ code = (response.code || '?') rescue response.to_s
end
unless code == '200'
test(severity, "HEAD #{path} - HTTP status: #{code}") unless severity ==
nil