aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-09-22 20:42:13 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-09-22 20:42:13 +0000
commitc4a694862c69f2b63c6b775cd6fdf1a7afcc0a52 (patch)
treeeacfe1159860fdb645161f5e7c63add86c07b1b9 /lib/http.c
parent1e076a4ae0d412ec2413f12db472fd52849d3d56 (diff)
- Michael Goffioul filed bug report #2107377 "Problem with mutli + GnuTLS +
proxy" (http://curl.haxx.se/bug/view.cgi?id=2107377) that showed how a multi interface using program didn't work when built with GnuTLS and a CONNECT request was done over a proxy (basically test 502 over a proxy to a HTTPS site). It turned out the ssl connect function would get called twice which caused the second call to fail.
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c
index b57d9b592..b60345b08 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1814,6 +1814,13 @@ static CURLcode https_connecting(struct connectdata *conn, bool *done)
CURLcode result;
DEBUGASSERT((conn) && (conn->protocol & PROT_HTTPS));
+ if(conn->ssl[FIRSTSOCKET].use) {
+ /* in some circumstances, this already has SSL enabled and then we don't
+ need to connect SSL again */
+ *done = TRUE;
+ return CURLE_OK;
+ }
+
/* perform SSL initialization for this socket */
result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done);
if(result) {