mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
Use Curl_connected_proxy() here instead of duplicating code. Spell out the
badness in the code flow even for the socks case.
This commit is contained in:
parent
f04720afb8
commit
51d1f309cd
30
lib/ftp.c
30
lib/ftp.c
@ -1890,31 +1890,11 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
|
|||||||
/* this just dumps information about this second connection */
|
/* this just dumps information about this second connection */
|
||||||
ftp_pasv_verbose(conn, conninfo, newhost, connectport);
|
ftp_pasv_verbose(conn, conninfo, newhost, connectport);
|
||||||
|
|
||||||
switch(data->set.proxytype) {
|
/* FIX: this MUST wait for a proper connect first if 'connected' is
|
||||||
#ifndef CURL_DISABLE_PROXY
|
FALSE to make proxies work properly here! */
|
||||||
case CURLPROXY_SOCKS5:
|
result = Curl_connected_proxy(conn);
|
||||||
case CURLPROXY_SOCKS5_HOSTNAME:
|
if(result)
|
||||||
result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
|
return result;
|
||||||
SECONDARYSOCKET, conn);
|
|
||||||
break;
|
|
||||||
case CURLPROXY_SOCKS4:
|
|
||||||
result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
|
|
||||||
SECONDARYSOCKET, conn, FALSE);
|
|
||||||
break;
|
|
||||||
case CURLPROXY_SOCKS4A:
|
|
||||||
result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
|
|
||||||
SECONDARYSOCKET, conn, TRUE);
|
|
||||||
break;
|
|
||||||
#endif /* CURL_DISABLE_PROXY */
|
|
||||||
case CURLPROXY_HTTP:
|
|
||||||
case CURLPROXY_HTTP_1_0:
|
|
||||||
/* do nothing here. handled later. */
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
failf(data, "unknown proxytype option given");
|
|
||||||
result = CURLE_COULDNT_CONNECT;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
|
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
|
||||||
if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
|
if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
|
||||||
/* FIX: this MUST wait for a proper connect first if 'connected' is
|
/* FIX: this MUST wait for a proper connect first if 'connected' is
|
||||||
|
Loading…
Reference in New Issue
Block a user