Better condition check for http or https server.