Catch UnicodeError for invalid host names.
Fix test cases for example.com redirection.
Close HTTP connections without body content. Github issue #376