Use url[:scheme] instead of protocol to determine if https is enabled