improved http(s) validation