diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2013-10-11 00:24:25 -0700 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2013-10-11 00:24:25 -0700 |
commit | 7a63d5e50b0ae16a38e673867abd6043d4becc07 (patch) | |
tree | 6d174d12a0de707ed8f875801a8dbc0c35f70d3f /include/network.php | |
parent | c2a88c3e4858e3eb2c553bdc775d2f684b0d46b4 (diff) | |
parent | 89fc319c900873be58fa677707518646f6c79eec (diff) | |
download | volse-hubzilla-7a63d5e50b0ae16a38e673867abd6043d4becc07.tar.gz volse-hubzilla-7a63d5e50b0ae16a38e673867abd6043d4becc07.tar.bz2 volse-hubzilla-7a63d5e50b0ae16a38e673867abd6043d4becc07.zip |
Merge pull request #2 from friendica/master
Upgraded to latest red
Diffstat (limited to 'include/network.php')
-rw-r--r-- | include/network.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php index 8b9a8a6a6..99a0a8e2b 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); @@ -1326,7 +1336,7 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority = } -function email_header_encode($in_str, $charset) { +function email_header_encode($in_str, $charset = 'UTF-8') { $out_str = $in_str; $need_to_convert = false; |