Closed
Description
#include <curl/curl.h>
long ChunkBgnFunction(const struct curl_fileinfo *finfo, struct callback_data *, int)
{
if (finfo->filetype == CURLFILETYPE_FILE)
return CURL_CHUNK_BGN_FUNC_SKIP;
return CURL_CHUNK_BGN_FUNC_OK;
}
void main()
{
curl_global_init(CURL_GLOBAL_ALL);
auto curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl, CURLOPT_URL, "ftp://gdc.cddis.eosdis.nasa.gov/gnss/data/daily/2020/brdc/*");
curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 1L);
curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
curl_easy_setopt(curl, CURLOPT_CHUNK_BGN_FUNCTION, ChunkBgnFunction);
const CURLcode code = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_global_cleanup();
}
The reason is about 1700 files in the directory.
libcurl version: 7.73.0
compiler: VS2019 16.7.7