From 51cfb1a01c558f4db73af9cc27196cdbe237ed4f Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Tue, 31 Oct 2023 09:18:43 +0100 Subject: use maxlength instead of method HEAD for is_reachable as some servers do not support HEAD --- it_url.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it_url.class b/it_url.class index bf6c512..dcf805c 100644 --- a/it_url.class +++ b/it_url.class @@ -73,7 +73,7 @@ function __construct($url = null) */ static function is_reachable($p = []) { - $result = static::get((is_array($p) ? $p : ['url' => $p]) + ['method' => 'HEAD', 'totaltimeout' => 5, 'assoc' => true, 'it_error' => false]); + $result = static::get((is_array($p) ? $p : ['url' => $p]) + ['maxlength' => 1, 'totaltimeout' => 5, 'assoc' => true, 'it_error' => false]); return $result['status'] >= 200 && $result['status'] < 400; } -- cgit v1.2.3