This is wrong: It should explicitly check for http/https. IsInternetstream also includes other types (eg. ftp)