summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class3
1 files changed, 3 insertions, 0 deletions
diff --git a/it_url.class b/it_url.class
index 80b7a44..d03ad07 100644
--- a/it_url.class
+++ b/it_url.class
@@ -251,6 +251,7 @@ function request($p=array())
$url = $this;
if ($p['url'])
$this->__construct($p['url']);
+ $this->errstr = "";
$url->headers = array();
$p['headers'] = (array)$p['headers'] + self::_default_headers($url, $p);
@@ -280,8 +281,10 @@ function request($p=array())
$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] : [])]);
+ $this->errstr = "HTTP Status " . $url->result;
} else {
$result =& $url->data;
+ $this->errstr = "HTTP Status " . $url->result;
}
} else {
$result = $this->result = false;