curl-library
bug of ftp Sock5 Proxy
Date: Thu, 25 Aug 2005 07:48:05 +0000
Hi:
In my project,i find libcurl cannot work witk sock5 proxy while try to
download a file
on ftp site,so i trace in it,find some bug(perhaps it is not),responds to
you.
file: url.c
function:createconnection
lines:2783
your code:
if(data->change.proxy &&
*data->change.proxy &&
!data->set.tunnel_thru_httpproxy)
my change:
if(data->change.proxy &&
*data->change.proxy &&
!data->set.tunnel_thru_httpproxy &&
data->set.proxytype == CURLPROXY_HTTP)
file: ftp.c
function:ftp_state_pasv_resp
lines:1864
your code:
result = Curl_connecthost(conn,
addr,
&conn->sock[SECONDARYSOCKET],
&conninfo,
&connected);
Curl_resolv_unlock(data, addr); /* we're done using this address */
if(result)
return result;
my change:
result = Curl_connecthost(conn,
addr,
&conn->sock[SECONDARYSOCKET],
&conninfo,
&connected);
Curl_resolv_unlock(data, addr); /* we're done using this address */
if (conn->data->set.proxytype == CURLPROXY_SOCKS5) {
result = my_handleSock5Proxy(conn->proxyuser,
conn->proxypasswd,
newport,//this value is get from server
conn) ?
CURLE_COULDNT_CONNECT : CURLE_OK;
}
if(result)
return result;
reason:for ftp senonardsock connect should handlesock5proxy.
thus is my change, and it work good.
thanks,and sorry for my pool english
Received on 2005-08-25