You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 31, 2020. It is now read-only.
As you probably know IPv6 addresses with ports are wrapped in square brackets (because the colon sign also appears in the IP address itself).
These brackets are not treated (removed) in any way currently, what leads to an behaviour I didn't expect.
I'd expect getHost() to return only the IP address, without brackets, as the port is stored seperately and obtainable via getPort().
Consider this example:
$ipv4Port = new \Zend\Uri\Uri('http://192.168.0.1:8080');
$ipv6Port = new \Zend\Uri\Uri('http://[fe80::240:63ff:fede:3c19]:8080');
echo$ipv4Port->getHost(); // -> 192.168.0.1 - expectedecho$ipv6Port->getHost(); // -> [fe80::240:63ff:fede:3c19] - unexpected
Is this intended behaviour, though, or just not yet adjusted to IPv6?