support plain HTTP
cleaned up shouldUseHttp(...) logic