]> granicus.if.org Git - curl/commitdiff
Curl_http_connect: detect HTTPS properly after CONNECT
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 Apr 2011 20:50:04 +0000 (22:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 20 Apr 2011 20:50:04 +0000 (22:50 +0200)
libcurl failed to check the correct struct for HTTPS after CONNECT was
issued to the proxy, so it didn't do the TLS handshake and subsequently
failed the connection. A regression released in 7.21.5 (introduced
around commit 8831000bc07de).

Bug: http://curl.haxx.se/mail/lib-2011-04/0134.html
Reported by: Josue Andrade Gomes

lib/http.c

index 960bb42794d37edb43823b73711826123deae6e9..1e463ee692a9079b591f7cdabb191ba22e424e48 100644 (file)
@@ -1303,7 +1303,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
   }
 #endif /* CURL_DISABLE_PROXY */
 
-  if(conn->handler->protocol & CURLPROTO_HTTPS) {
+  if(conn->given->protocol & CURLPROTO_HTTPS) {
     /* perform SSL initialization */
     if(data->state.used_interface == Curl_if_multi) {
       result = https_connecting(conn, done);