Fix of protocol handling (http/https)