0
连接到服务器并发送特定的QUOTE命令时,libcurl(7.29.0)似乎在请求目录列表,即使我不想要这样做。 这是我回来的回应,它表示发送MDTM命令后,libcurl发送一个我不想要的LIST命令。我如何防止它发送LIST?的卷曲会话代码阻止libcurl发送FTP LIST命令
* Request has same path as previous transfer
> MDTM fileName
< 213 20130324223404
> EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||x|)
* Trying ip...
* Connecting to ip (ip) port x
> LIST
< 150 Here comes the directory listing.
部分(我重用这里的卷曲处理以前改变了远程目录到文件名是和得到一个目录用于其他目的上市):
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);