aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2013-09-15 03:21:19 +0200
committerChristian Vogeley <christian.vogeley@hotmail.de>2013-09-15 03:21:19 +0200
commit4132d1cd8e59d2cf84d7578ac700c65d7954edd6 (patch)
tree5586bb1bf97ad9e457de2eacb298d28e22c854ee /include/network.php
parent496f869157ab76139d14a3c67fd8276ee6557517 (diff)
parentaefb0f823353d15a281d3c94ec6fc044e1b62580 (diff)
downloadvolse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.tar.gz
volse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.tar.bz2
volse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.zip
Upstream merge
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/network.php b/include/network.php
index 8b9a8a6a6..00d931f19 100644
--- a/include/network.php
+++ b/include/network.php
@@ -312,8 +312,13 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
$rc = intval($http_code);
$ret['return_code'] = $rc;
$ret['success'] = (($rc >= 200 && $rc <= 299) ? true : false);
+ if(! $ret['success']) {
+ $ret['debug'] = $curl_info;
+ logger('z_fetch_url: debug:' . print_r($curl_info,true), LOGGER_DATA);
+ }
$ret['body'] = substr($s,strlen($header));
$ret['header'] = $header;
+
@curl_close($ch);
return($ret);
}
@@ -407,6 +412,11 @@ function z_post_url($url,$params, $redirects = 0, $opts = array()) {
$rc = intval($http_code);
$ret['return_code'] = $rc;
$ret['success'] = (($rc >= 200 && $rc <= 299) ? true : false);
+ if(! $ret['success']) {
+ $ret['debug'] = $curl_info;
+ logger('z_fetch_url: debug:' . print_r($curl_info,true), LOGGER_DATA);
+ }
+
$ret['body'] = substr($s,strlen($header));
$ret['header'] = $header;
curl_close($ch);