]> git.mxchange.org Git - friendica.git/commitdiff
Close cURL handle before recursing, so that cookie file is flushed
authorMatthew Exon <github.mexon@spamgourmet.com>
Sun, 14 Sep 2014 03:00:33 +0000 (05:00 +0200)
committerMatthew Exon <mat@exon.name>
Wed, 11 Feb 2015 03:42:07 +0000 (03:42 +0000)
include/network.php

index 251de07c42ab9d49f5f90e23c620b9a195391a02..83d4c731a9abaff7fd9407c92bea177178165492 100644 (file)
@@ -71,6 +71,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_
 
        $base = $s;
        $curl_info = @curl_getinfo($ch);
+       @curl_close($ch);
        $http_code = $curl_info['http_code'];
        logger('fetch_url '.$url.': '.$http_code." ".$s, LOGGER_DATA);
        $header = '';
@@ -110,7 +111,6 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_
 
        $body = substr($s,strlen($header));
        $a->set_curl_headers($header);
-       @curl_close($ch);
 
        $a->save_timestamp($stamp1, "network");