This will throw an exception if `uri.scheme` is nil or not a string. Consider doing `uri.scheme.to_s.downcase` instead.