https detection fix for some cloud hostings like appfog