diff options
author | Nathan Gass | 2015-06-23 12:27:24 +0200 |
---|---|---|
committer | Nathan Gass | 2015-06-23 12:27:24 +0200 |
commit | 4d56582966bc741c579712bd904aee9680af8f62 (patch) | |
tree | fc1768f02a79381f61204fd0fe6c410553f32bb2 /it_url.class | |
parent | 203735cffb9bae0dcae4a89c756ce6363b5b1f38 (diff) | |
download | itools-4d56582966bc741c579712bd904aee9680af8f62.tar.gz itools-4d56582966bc741c579712bd904aee9680af8f62.tar.bz2 itools-4d56582966bc741c579712bd904aee9680af8f62.zip |
fix ->result for totaltimeout and maxlength (should be same as return value), also fix interaction between maxlength and safety
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/it_url.class b/it_url.class index a0c5844..5973887 100644 --- a/it_url.class +++ b/it_url.class @@ -383,14 +383,14 @@ function request($p=array()) } if (time() >= $endtime) - $result = false; + $result = $this->result = false; + + if ($p['maxlength'] && (strlen($this->data) + $len > $p['maxlength'])) + $result = $this->result = false; if ($result === false && $p['safety'] == 1) it::error(array('title' => "problem (timeout?) getting $url->url " . $errstr) + (array)$p['it_error']); - if ($p['maxlength'] && (strlen($this->data) + $len > $p['maxlength'])) - $result = false; - return $result; } |