On Sun, Dec 2, 2012 at 6:09 AM, David Madison <lists / ruby-forum.com> wrote:
> tamouse mailing lists wrote in post #1087487:
>> Underscores aren't valid in domain names..., just a-z, 0-9, and -
>
>
> 1) See Brian Candler's informative post above mine.
> 2) URIs are used for more than just domains/http
> 3) There are *many* subdomains that use underscore across the web.
> Fight them, not me.  I need to write software that works with those
> subdomains.
>
> --
> Posted via http://www.ruby-forum.com/.
>

I see his point, and yours, but I would say your patch is not solving
the actual underlying problem.

Handling an underscore in a domain name as you are is expedient to the
immediate issue you seem to have, however it is not a fix.

The DNS specs are broad, as they should be, in what is considered
valid as far as what the DNS can store. However, the DNS specs are not
what is authoritative for URI syntax, that is covered by RFC 3986,
with the BNF defined in Appendix A. Even this, though, is complicated
by IDNA (RFC 5891).

In any case, the URI module needs to be rethought in a way to handle
both of these considerations, not just patched to allow the
underscore.