summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2015-06-23 12:27:24 +0200
committerNathan Gass2015-06-23 12:27:24 +0200
commit4d56582966bc741c579712bd904aee9680af8f62 (patch)
treefc1768f02a79381f61204fd0fe6c410553f32bb2
parent203735cffb9bae0dcae4a89c756ce6363b5b1f38 (diff)
downloaditools-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
-rw-r--r--it_url.class8
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;
}