X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fhttp%2FHttpAccess.php;h=e80e0c014be5450be0ca42f9fee53b0d070c6fac;hb=b3bd8c3e8d367975980043e772f7cd78b7f96bc6;hp=81d9e0762862f5265c65de6058b6fa911a4d7033;hpb=c22fa57a5505fe95fd01860e3d3dfbb089f869cd;p=github%2Fshaarli%2FShaarli.git diff --git a/application/http/HttpAccess.php b/application/http/HttpAccess.php index 81d9e076..e80e0c01 100644 --- a/application/http/HttpAccess.php +++ b/application/http/HttpAccess.php @@ -14,9 +14,14 @@ namespace Shaarli\Http; */ class HttpAccess { - public function getHttpResponse($url, $timeout = 30, $maxBytes = 4194304, $curlWriteFunction = null) - { - return get_http_response($url, $timeout, $maxBytes, $curlWriteFunction); + public function getHttpResponse( + $url, + $timeout = 30, + $maxBytes = 4194304, + $curlHeaderFunction = null, + $curlWriteFunction = null + ) { + return get_http_response($url, $timeout, $maxBytes, $curlHeaderFunction, $curlWriteFunction); } public function getCurlDownloadCallback( @@ -25,7 +30,7 @@ class HttpAccess &$description, &$keywords, $retrieveDescription, - $curlGetInfo = 'curl_getinfo' + $tagsSeparator ) { return get_curl_download_callback( $charset, @@ -33,7 +38,12 @@ class HttpAccess $description, $keywords, $retrieveDescription, - $curlGetInfo + $tagsSeparator ); } + + public function getCurlHeaderCallback(&$charset, $curlGetInfo = 'curl_getinfo') + { + return get_curl_header_callback($charset, $curlGetInfo); + } }