added support for underscrore character in the host name of a uri.
fixed test to account for underscore in uri host name