X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FHttpUtils.php;h=2e0792f97a5d2fdbfdf2b8978e2012300f519e54;hb=15170b516429341ae8e1a9ad2111be5ef90bf6aa;hp=0e1ce8798878e3a8043d581da18e44427914bec8;hpb=86deafe0ff5a22a37255546cf82325e89bf272b1;p=github%2Fshaarli%2FShaarli.git diff --git a/application/HttpUtils.php b/application/HttpUtils.php index 0e1ce879..2e0792f9 100644 --- a/application/HttpUtils.php +++ b/application/HttpUtils.php @@ -27,7 +27,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304) { $urlObj = new Url($url); - $cleanUrl = $urlObj->indToAscii(); + $cleanUrl = $urlObj->idnToAscii(); if (! filter_var($cleanUrl, FILTER_VALIDATE_URL) || ! $urlObj->isHttp()) { return array(array(0 => 'Invalid HTTP Url'), false); @@ -70,7 +70,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304) * Retrieve HTTP headers, following n redirections (temporary and permanent ones). * * @param string $url initial URL to reach. - * @param int $redirectionLimit max redirection follow.. + * @param int $redirectionLimit max redirection follow. * * @return array HTTP headers, or false if it failed. */ @@ -193,7 +193,7 @@ function server_url($server) function index_url($server) { $scriptname = $server['SCRIPT_NAME']; - if (endswith($scriptname, 'index.php')) { + if (endsWith($scriptname, 'index.php')) { $scriptname = substr($scriptname, 0, -9); } return server_url($server) . $scriptname;