normalize_url (OpenID)

    # File lib/openid/consumer/discovery.rb, line 291
      def self.normalize_url(url)
        # Normalize a URL, converting normalization failures to
        # DiscoveryFailure
        begin
          normalized = URINorm.urinorm(url)
        rescue URI::Error => why
          raise DiscoveryFailure.new("Error normalizing #{url}: #{why.message}", nil)
        else
          defragged = URI::parse(normalized)
          defragged.fragment = nil
          return defragged.normalize.to_s
        end
      end