normalize() public

Returns normalized URI.

require 'uri'

URI("HTTP://my.EXAMPLE.com").normalize
#=> #<URI::HTTP http://my.example.com/>

Normalization here means:

  • scheme and host are converted to lowercase,

  • an empty path component is set to “/”.

Show source
Register or log in to add new notes.