ftp - C++ libcurl: curl_easy_perform() returned CURLE_OK eventhough it received response code 226 -
i'm sending files linux server windows remote system using libcurl ftp.
below code
curl_easy_setopt(curlsessionhandle, curlopt_url, remotefileurl); curl_easy_setopt(curlsessionhandle, curlopt_upload, on); // set input local file handle curl_easy_setopt(curlsessionhandle, curlopt_readdata, localfilehandle); // set on/off wanted options // enable ftp data connection curl_easy_setopt(curlsessionhandle, curlopt_nobody, off); // create missing directory ftp path curl_easy_setopt(curlsessionhandle, curlopt_ftp_create_missing_dirs , on) ; // set progress function, in order check stop transfer request curl_easy_setopt(curlsessionhandle, curlopt_noprogress, off); curl_easy_setopt(curlsessionhandle, curlopt_progressfunction, progresscb); curl_easy_setopt(curlsessionhandle, curlopt_progressdata, this); curlcode result = curl_easy_perform(curlsessionhandle);
====================================================================
few files not transferred remote didn't receive error curl_easy_perform(). happening randomly.
i have collected wireshark logs, trace shows [rst, ack] sent our side remote system don't know reason , response code 226 sent remote system, think should receive error code curl_easy_perform() instead of curle_ok. please correct me if i'm wrong.
please check image has wireshark traces.
source ip: 82 linux server & destination ip: 87 windows remote system
i know why sending [rst, ack] remote , why libcurl not returning error code. can explain me there way handle problem.
i have uploaded images of success , failure case. please check , let me know
Comments
Post a Comment