If location URL looks like scp address:
http://some_address:~/some_image then glance accepts this address
and creates a malformed image.
The problem here is because python http_client lib is trying to
recognize '~' as port but it is not acceptable port name.
The lib generates an InvalidURL exception but this exception is
hidden in one of universal catchers(except Exception).
We need to validate port name (is present before passing it to
http_client lib.
Change-Id: I36dddf7059711fb15ecb1fec4e438daf2bffcb60
Closes-bug: #1485792