Prevent libcurl from sending FTP LIST command -


when connecting server , sending specific quote command libcurl(7.29.0) appears requesting directory listing though not want this. response indicates after mdtm command sent libcurl sends list command not want. how prevent sending list?

* request has same path previous transfer > mdtm filename < 213 20130324223404 > epsv * connect data stream passively < 229 entering extended passive mode (|||x|) *   trying ip... * connecting ip (ip) port x > list < 150 here comes directory listing. 

portion of curl session code (i reusing curl handle here changed remote directory filename , directory listing other purposes):

    headers = null;     headers = curl_slist_append(headers, "mdtm filename");     curl_easy_setopt(curlsession, curlopt_quote, headers);            curl_easy_setopt(curlsession, curlopt_writeheader, &filemodresponse);     res = curl_easy_perform(curlsession); 

i downloaded libcurl source , found answer. specifying curlopt_nobody option prevents sending ftp list command.

curl_easy_setopt(curlsession, curlopt_nobody, 1); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -