New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wildcard URL option causes infinite loop #11775
Comments
I found an old issue which is maybe related to this issue: Infinite loop in curl_fnmatch #2015 |
I can reproduce this on git HEAD. It continuously downloads all matching files; when it gets to the end of the wildcards, it starts over again. I've turned the code above into a self-sufficient reproduction example that shows it. In ver. 7.74.0 it runs through files once then stops, and in 8.4.1-dev it loops forever (or, at least a few times before I get bored and stop it). |
I bisected this to commit 843b3ba (ver. 8.1.0). I won't have time to look at it any more in the near future. |
To avoid the state machine to start over and redownload all the files *again*. Reported-by: lkordos on github Regression from 843b3ba (shipped in 8.1.0) Bisect-by: Dan Fandrich Fixes curl#11775 Closes curl#12156
I did this
I run the code:
I expected the following
I expected the parquet data files will be downloaded. The files were downloaded, but after downloading the last file from the remote directory, the download didn't stop. Instead, the download continued with the first file in the directory.
When I changed the option
curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
tocurl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 0L);
and replaced the wildcard in URL with full name of a single file, the single file was downloaded as expected.curl/libcurl version
curl 8.2.1
operating system
Windows 11 Pro
Using MS VC++ 2022, std::c++20
The text was updated successfully, but these errors were encountered: