Closed dlecocq closed 8 years ago
LGTM, good test.
I'm not sure we should only do this check in punycode
or if we should do it at parse time (in the old url-py
, it was the IDNA codec that detected this). To that end, I pulled it out into its own function so we can drop it wherever we want later.
On the one hand, it's only a problem for DNS, not URLs per se. And punycode
is the only part that is interested in DNS, so it would make sense that it would be detected there. On the other hand, any URLs we deal with practically will probably deal with DNS.
LGTM
Pair of https://github.com/seomoz/url-cpp/pull/22
@b4hand @lindseyreno @tammybailey