Guo Xiang Tan 6ecf37c482 Improve URL validation to check for a valid host.
Parsing a URL with `URI` is not sufficient as the following cases
are considered valid:

URI.parse("http://https://google.com")
=> #<URI::HTTP http://https//google.com>
2017-12-21 13:50:15 +08:00
..
2017-12-15 11:42:51 +11:00
2017-07-28 10:20:09 +09:00
2017-10-09 10:27:52 +11:00
2017-07-28 10:20:09 +09:00
2017-07-28 10:20:09 +09:00
2017-07-28 10:20:09 +09:00
2017-12-05 07:04:41 +11:00