From 7243fa31a6bb8ae20d444294bb5c7cf67ec99e3d Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Fri, 5 Apr 2019 14:04:28 +0200 Subject: Send alert when we try to get overly long urls --- it_url.class | 2 ++ 1 file changed, 2 insertions(+) (limited to 'it_url.class') diff --git a/it_url.class b/it_url.class index e3139c8..e557ccf 100644 --- a/it_url.class +++ b/it_url.class @@ -278,6 +278,8 @@ function request($p=array()) $this->errstr = "maxlength reached"; } else if ($p['filemtime'] && ($url->result == 304)) { $result = true; # Not modified, success but no data + } else if ($url->result == 414) { + it::error((array)$p['it_error'] + ['title' => "Request-URI Too Long: " . substr($url->url, 0, 100) . "...(truncated " . (strlen($url->url) - 100) . " bytes)", 'body' => curl_getinfo($curl) + ($p['verbose'] ? ['verbose' => $this->verbose] : [])]); } else { $result =& $url->data; } -- cgit v1.2.3