3 ms·
We can't really criticise modern application developers for looking at this complexity, shrugging, and just using the only API available - inet_pton In a sensi
by nly 1y ago
We can't really criticise modern application developers for looking at this complexity, shrugging, and just using the only API available - inet_pton
In a sensible world inet_pton would be deprecated with a compiler warning and replaced with inet_pton2 that just accepted the sensible subset.
The HTTP RFCs actually do restrict the format within URIs, but modern browsers are still more liberal
https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2 https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2
One thing I've previously lamented is how IPv6 requires parens for IP:port pair string - particularly problematic if you want to be able to have a default port when the suffix is missing.