Closed s-thet closed 8 years ago
Trying to load http://www.köln.de punycode encoded results in warnings and fatal errors.
http://www.köln.de
<?php $url = 'http://www.xn--kln-sna.de'; $req = new \http\Client\Request('GET', $url); $client = (new \http\Client())->enqueue($req)->send();
PHP Warning: http\Client\Request::__construct(): Failed to parse host; unexpected '-' at pos 7 in 'www.xn--kln-sna.de' PHP Fatal error: Uncaught http\Exception\RuntimeException: http\Client::enqueue(): Cannot request empty URL Stack trace: #0 ...: http\Client->enqueue(Object(http\Client\Request)) #1 {main}
Thanks for your report!
In the meantime, if your build supports IDNA, you can use the NFC-UTF8 URL as-is.
Trying to load
http://www.köln.de
punycode encoded results in warnings and fatal errors.