diff options
author | Daniel Stenberg <daniel@haxx.se> | 2013-01-17 12:59:23 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2013-01-17 19:40:35 +0100 |
commit | c43127414d89ccb9ef6517081f68986d991bcfb3 (patch) | |
tree | f6a639061f5e199089a923b052904aa24901243c /lib/http.c | |
parent | 9fd88abb7032346e88636165e688232e36f5c336 (diff) |
always-multi: always use non-blocking internals
Remove internal separated behavior of the easy vs multi intercace.
curl_easy_perform() is now using the multi interface itself.
Several minor multi interface quirks and bugs have been fixed in the
process.
Much help with debugging this has been provided by: Yang Tse
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/lib/http.c b/lib/http.c index 21f7c21e6..daaafe317 100644 --- a/lib/http.c +++ b/lib/http.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -1295,22 +1295,16 @@ Curl_compareheader(const char *headerline, /* line to check */ */ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) { - struct SessionHandle *data; CURLcode result; - data=conn->data; - /* We default to persistent connections. We set this already in this connect function to make the re-use checks properly be able to check this bit. */ conn->bits.close = FALSE; - if(data->state.used_interface == Curl_if_multi) { - /* when the multi interface is used, the CONNECT procedure might not have - been completed */ - result = Curl_proxy_connect(conn); - if(result) - return result; - } + /* the CONNECT procedure might not have been completed */ + result = Curl_proxy_connect(conn); + if(result) + return result; if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) /* nothing else to do except wait right now - we're not done here. */ @@ -1318,22 +1312,12 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) if(conn->given->flags & PROTOPT_SSL) { /* perform SSL initialization */ - if(data->state.used_interface == Curl_if_multi) { - result = https_connecting(conn, done); - if(result) - return result; - } - else { - /* BLOCKING */ - result = Curl_ssl_connect(conn, FIRSTSOCKET); - if(result) - return result; - *done = TRUE; - } + result = https_connecting(conn, done); + if(result) + return result; } - else { + else *done = TRUE; - } return CURLE_OK; } |