1
0
Fork 0

Merge pull request #3791 from annando/parse-fix

Bugfix: Range checking with ParseUrl made problems
This commit is contained in:
Tobias Diekershoff 2017-10-16 00:37:05 +02:00 committed by GitHub
commit 74af893b87
2 changed files with 9 additions and 45 deletions

View file

@ -65,7 +65,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_
* string 'body' => fetched content
*/
function z_fetch_url($url, $binary = false, &$redirects = 0, $opts = array()) {
$ret = array('return_code' => 0, 'success' => false, 'header' => '', 'body' => '');
$ret = array('return_code' => 0, 'success' => false, 'header' => '', 'info' => '', 'body' => '');
$stamp1 = microtime(true);
@ -173,6 +173,7 @@ function z_fetch_url($url, $binary = false, &$redirects = 0, $opts = array()) {
$base = $s;
$curl_info = @curl_getinfo($ch);
$ret['info'] = $curl_info;
$http_code = $curl_info['http_code'];
logger('fetch_url ' . $url . ': ' . $http_code . " " . $s, LOGGER_DATA);