adding HTTPS support via the HTTP CONNECT method