From: Jeroen van Ingen Date: 2012-04-01T04:18:38+09:00 Subject: Re: Can't open url with a subdomain with an underscore Bartosz DziewoƄski wrote in post #1054173: > Underscore is not a valid character in a hostname, thus Ruby rejects it. > > To allow it, you have to manually add it to the regex in library file > uri/common.rb, line 368. (On my Windows install, > F:\Ruby193\lib\ruby\1.9.1\uri), to looks like this: > > ret[:HOSTNAME] = hostname = "(?:[a-zA-Z0-9\\-._]|%\\h\\h)+" > > (I just added an underscore there.) This might of course break URI > parsing for other protocols. > > -- Matma Rex Thanks for the reply, but I don't think it's a good idea to 'hack' the library. Like you said 'it could break other URI's'. But even if I'm going to hackl the library, I ran into another difficulty. I'll have to hack the library on all the servers I deploy the Ruby-app to. Again, thanks for your reply, but I don't think it's a good idea. -- Posted via http://www.ruby-forum.com/.