diff --git a/classes/File_redirection.php b/classes/File_redirection.php index d6fa0bcb62..363e3b947c 100644 --- a/classes/File_redirection.php +++ b/classes/File_redirection.php @@ -182,7 +182,7 @@ class File_redirection extends Memcached_DataObject } } - if (('ftp' == $p['scheme']) || ('http' == $p['scheme']) || ('https' == $p['scheme'])) { + if (('ftp' == $p['scheme']) || ('ftps' == $p['scheme']) || ('http' == $p['scheme']) || ('https' == $p['scheme'])) { if (empty($p['host'])) return false; if (empty($p['path'])) { $out_url .= '/'; diff --git a/tests/URLDetectionTest.php b/tests/URLDetectionTest.php index ed29dc88ea..e69f1a2c38 100644 --- a/tests/URLDetectionTest.php +++ b/tests/URLDetectionTest.php @@ -28,27 +28,27 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase array('example', 'example'), array('http://example', - 'http://example'), + 'http://example'), array('http://example/', - 'http://example/'), + 'http://example/'), array('http://example/path', - 'http://example/path'), + 'http://example/path'), array('http://example.com', - 'http://example.com'), + 'http://example.com'), array('https://example.com', - 'https://example.com'), + 'https://example.com'), array('ftp://example.com', - 'ftp://example.com'), + 'ftp://example.com'), array('ftps://example.com', - 'ftps://example.com'), + 'ftps://example.com'), array('http://user@example.com', - 'http://user@example.com'), + 'http://user@example.com'), array('http://user:pass@example.com', - 'http://user:pass@example.com'), + 'http://user:pass@example.com'), array('http://example.com:8080', - 'http://example.com:8080'), + 'http://example.com:8080'), array('http://www.example.com', - 'http://www.example.com'), + 'http://www.example.com'), array('http://example.com/', 'http://example.com/'), array('http://example.com/path', @@ -58,7 +58,7 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase array('http://example.com/path.html#fragment', 'http://example.com/path.html#fragment'), array('http://example.com/path.php?foo=bar&bar=foo', - 'http://example.com/path.php?foo=bar&bar=foo'), + 'http://example.com/path.php?foo=bar&bar=foo'), array('http://müllärör.de', 'http://müllärör.de'), array('http://ﺱﺲﺷ.com',