1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

no proxy support if libcurl is built with HTTP disabled

This commit is contained in:
Yang Tse 2007-02-27 02:24:13 +00:00
parent 7444342675
commit acc4cf87cd

View File

@ -61,7 +61,9 @@ typedef enum {
CURLM_STATE_CONNECT, /* resolve/connect has been sent off */ CURLM_STATE_CONNECT, /* resolve/connect has been sent off */
CURLM_STATE_WAITRESOLVE, /* awaiting the resolve to finalize */ CURLM_STATE_WAITRESOLVE, /* awaiting the resolve to finalize */
CURLM_STATE_WAITCONNECT, /* awaiting the connect to finalize */ CURLM_STATE_WAITCONNECT, /* awaiting the connect to finalize */
#ifndef CURL_DISABLE_HTTP
CURLM_STATE_WAITPROXYCONNECT, /* awaiting proxy CONNECT to finalize */ CURLM_STATE_WAITPROXYCONNECT, /* awaiting proxy CONNECT to finalize */
#endif
CURLM_STATE_PROTOCONNECT, /* completing the protocol-specific connect CURLM_STATE_PROTOCONNECT, /* completing the protocol-specific connect
phase */ phase */
CURLM_STATE_WAITDO, /* wait for our turn to send the request */ CURLM_STATE_WAITDO, /* wait for our turn to send the request */
@ -875,9 +877,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
if(protocol_connect) if(protocol_connect)
multistate(easy, CURLM_STATE_WAITDO); multistate(easy, CURLM_STATE_WAITDO);
else { else {
#ifndef CURL_DISABLE_HTTP
if (easy->easy_conn->bits.tunnel_connecting) if (easy->easy_conn->bits.tunnel_connecting)
multistate(easy, CURLM_STATE_WAITPROXYCONNECT); multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
else else
#endif
multistate(easy, CURLM_STATE_WAITCONNECT); multistate(easy, CURLM_STATE_WAITCONNECT);
} }
} }
@ -908,9 +912,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
if(protocol_connect) if(protocol_connect)
multistate(easy, CURLM_STATE_DO); multistate(easy, CURLM_STATE_DO);
else { else {
#ifndef CURL_DISABLE_HTTP
if (easy->easy_conn->bits.tunnel_connecting) if (easy->easy_conn->bits.tunnel_connecting)
multistate(easy, CURLM_STATE_WAITPROXYCONNECT); multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
else else
#endif
multistate(easy, CURLM_STATE_WAITCONNECT); multistate(easy, CURLM_STATE_WAITCONNECT);
} }
} }
@ -925,6 +931,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
} }
break; break;
#ifndef CURL_DISABLE_HTTP
case CURLM_STATE_WAITPROXYCONNECT: case CURLM_STATE_WAITPROXYCONNECT:
/* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */ /* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */
easy->result = Curl_http_connect(easy->easy_conn, &protocol_connect); easy->result = Curl_http_connect(easy->easy_conn, &protocol_connect);
@ -934,6 +941,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
multistate(easy, CURLM_STATE_WAITCONNECT); multistate(easy, CURLM_STATE_WAITCONNECT);
} }
break; break;
#endif
case CURLM_STATE_WAITCONNECT: case CURLM_STATE_WAITCONNECT:
/* awaiting a completion of an asynch connect */ /* awaiting a completion of an asynch connect */