diff options
author | Nathan Gass | 2023-10-31 09:18:43 +0100 |
---|---|---|
committer | Nathan Gass | 2023-10-31 09:18:43 +0100 |
commit | 51cfb1a01c558f4db73af9cc27196cdbe237ed4f (patch) | |
tree | 545570b9d56a5a712edbe6892e35f0e2d4f79ea9 /it_url.class | |
parent | 26f51cfc1e09dd40c80d8ad82831622f306e0202 (diff) | |
download | itools-51cfb1a01c558f4db73af9cc27196cdbe237ed4f.tar.gz itools-51cfb1a01c558f4db73af9cc27196cdbe237ed4f.tar.bz2 itools-51cfb1a01c558f4db73af9cc27196cdbe237ed4f.zip |
use maxlength instead of method HEAD for is_reachable as some servers do not support HEAD
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |