summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2021-03-29 08:08:58 +0200
committerpks <pks@pks.rocks>2021-03-29 08:08:58 +0200
commit034f8d82c700f37247a395da534e33b21d372c1d (patch)
tree1a957b0c7e1ead63fa4f62e8ff25047643a13680
parent9076abf2fb99c6ce87c80b7a8cf8680034cc32a3 (diff)
allow 401
-rwxr-xr-xup.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/up.rb b/up.rb
index 0db1ea0..a9b7781 100755
--- a/up.rb
+++ b/up.rb
@@ -53,8 +53,9 @@ class Host
begin
url = URI site
response = Net::HTTP.get_response url
+ puts response.code
#return response.kind_of? Net::HTTPSuccess
- return [200, 301].include? response.code.to_i
+ return [200, 301, 401].include? response.code.to_i
rescue
return false
end