GeneralUtility::isValidUrl() idna converts whole URI instead of
domain only.
The expensive idna_convert() is called from isValidUrl(). Instead of
feeding it just the domain part, the whole URI is converted.
When supplying just the domain part, a great speed gain can be seen.
On seriously malformed URLs, parse_url() may return FALSE and emits an
E_WARNING. So we check for that first.
PHP no longer supports the flags FILTER_FLAG_HOST_REQUIRED and
FILTER_FLAG_SCHEME_REQUIRED. A scheme is now required by default. [1]
Return FALSE if the URL does not start with a scheme.
A public GeneralUtility::idnaEncode() method uses a static idna_convert
instance and fetches converted strings from a string cache array
to avoid multiple checks on the same domain.
All manual idna_convert instances are replaced with
GeneralUtility::idnaEncode() calls.
Special characters are not allowed in the URL except in the domain
part [2]. So the test with special characters in the path was removed
from the GeneralUtilityTest class.
[1] http://www.php.net/manual/en/filter.filters.flags.php#107382
[2] http://tools.ietf.org/html/rfc3986#appendix-A