]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/HttpUtils.php
Bump version to v0.7.1
[github/shaarli/Shaarli.git] / application / HttpUtils.php
index 0e1ce8798878e3a8043d581da18e44427914bec8..2e0792f97a5d2fdbfdf2b8978e2012300f519e54 100644 (file)
@@ -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;