diff options
author | Nathan Gass | 2017-12-18 16:38:23 +0100 |
---|---|---|
committer | Nathan Gass | 2017-12-18 16:38:23 +0100 |
commit | 440f08f07dab0233716937e432d921436a342ee1 (patch) | |
tree | 6b8cbef0b06fee85d8b800947b19ae8b78ba3498 /it_url.class | |
parent | 3d4d646cb366bd6de2bab48ce68f7c9edd2c61e9 (diff) | |
download | itools-440f08f07dab0233716937e432d921436a342ee1.tar.gz itools-440f08f07dab0233716937e432d921436a342ee1.tar.bz2 itools-440f08f07dab0233716937e432d921436a342ee1.zip |
include curl_getinfo for errors, remove unused variable
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/it_url.class b/it_url.class index f5c2ab8..20dd171 100644 --- a/it_url.class +++ b/it_url.class @@ -252,7 +252,7 @@ function request($p=array()) if ($p['maxlength'] && (strlen($this->data) > $p['maxlength'])) { $result = $this->result = false; - $errstr = $this->errstr = "maxlength reached"; + $this->errstr = "maxlength reached"; } else if ($p['filemtime'] && ($url->result == 304)) { $result = true; # Not modified, success but no data } else { @@ -260,11 +260,12 @@ function request($p=array()) } } else { $result = $this->result = false; - $errstr = $this->errstr = curl_error($curl); + $this->errstr = curl_error($curl); + $this->curlinfo = curl_getinfo($curl); } if ($got === false && $p['retries'] <= 0) - it::error((array)$p['it_error'] + ['title' => "problem getting $url->url with curl: " . curl_error($curl)]); + it::error((array)$p['it_error'] + ['title' => "problem getting $url->url with curl: " . curl_error($curl), 'body' => curl_getinfo($curl)]); return $result; } |