diff options
author | Christian Schneider | 2019-04-05 14:04:28 +0200 |
---|---|---|
committer | Christian Schneider | 2019-04-05 14:04:28 +0200 |
commit | 7243fa31a6bb8ae20d444294bb5c7cf67ec99e3d (patch) | |
tree | ebfa2c1cb4da88df5904b25b86a8caa0824b4bd2 /it_url.class | |
parent | c466ea2af3f0a38116822347663b5a28ffd7553c (diff) | |
download | itools-7243fa31a6bb8ae20d444294bb5c7cf67ec99e3d.tar.gz itools-7243fa31a6bb8ae20d444294bb5c7cf67ec99e3d.tar.bz2 itools-7243fa31a6bb8ae20d444294bb5c7cf67ec99e3d.zip |
Send alert when we try to get overly long urls
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |