From: Dan Cuddeford Date: 2008-01-24T23:23:14+09:00 Subject: Re: Creating a canonicalized url So it seems using the two together require 'uri' uri = URI.parse("http://www.ruBy-lang.org/ARSE") can = uri.normalize p can p can.host p can.path means the path keeps it's case sensitivity but the host is normalized. I think that's it - however, try it with ruby-lang..org and /usr/lib/ruby/1.8/uri/generic.rb:195:in `initialize': the scheme http does not accept registry part: www.ruBy-lang..org (or bad hostname?) (URI::InvalidURIError) from /usr/lib/ruby/1.8/uri/http.rb:78:in `initialize' from /usr/lib/ruby/1.8/uri/common.rb:488:in `new' from /usr/lib/ruby/1.8/uri/common.rb:488:in `parse' from canon.rb:3 So I guess it needs a bit or error checking before hand. -- Posted via http://www.ruby-forum.com/.