Red Hat Bugzilla – Bug 1005686
Long delay when FTP connection is interrupted from CURLOPT_HEADERFUNCTION callback
Last modified: 2013-09-22 20:07:22 EDT
Created attachment 795521 [details]
Reproducer (Use flags "-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lglib-2.0 -lcurl")
Description of problem:
I am using CURLOPT_HEADERFUNCTION for parsing FTP return codes (messages) while downloading via FTP.
I am specially interested in FTP code 213 which returns size of a downloaded file. Sometimes I know expected size and when this size differ from size that server reports (via the 213 code), then I want to interrupt this download.
The download interruption is done by returning a bad return value from the CURLOPT_HEADERFUNCTION callback. But I've met the problem, that after a bad return value is returned, the CURL hangs for about 60sec (just my estimation, I didn't do exact measurement) before it returns from curl_easy_perform().
My expectation is that curl_easy_perform() return immediately after CURLOPT_HEADERFUNCTION returns the bad return value.
Version-Release number of selected component (if applicable):
Check the attached reproducer
60sec hang after download is interrupted
It works! Thank you!
Do you plan to make a build with this patch for F18 and F19 sometimes, or it will be only rawhide stuff?
fixed in curl-7.32.0-2.fc21
(In reply to Tomas Mlcoch from comment #2)
> Do you plan to make a build with this patch for F18 and F19 sometimes, or it
> will be only rawhide stuff?
Sure, will submit updates for F18+ shortly.
curl-7.29.0-11.fc19 has been submitted as an update for Fedora 19.
curl-7.27.0-12.fc18 has been submitted as an update for Fedora 18.
curl-7.32.0-2.fc20 has been submitted as an update for Fedora 20.
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing curl-7.32.0-2.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
curl-7.29.0-11.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
curl-7.27.0-12.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
curl-7.32.0-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.