-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
Hi,
when setting CURLOPT_USE_SSL to CURLUSESSL_ALL, recent libcurl builds have become extremely slow. After debugging it became clear why:
Even when reusing the same easy handle, the control connection is closed after every FTP data download, instead of being kept open.
Looking at Wireshark the logs are filled with lots of "AUTH SSL", when there should in fact be only a single one.
Reproduce:
curl --user demo:password --ssl-reqd ftp://test.rebex.net//pub/ ftp://test.rebex.net//pub/example/
Expected: only 1 "AUTH SSL"
Actual: 2 "AUTH SSL"
The problem is caused by the following commit:
3f5da4e#diff-7dafef8d70eee3940c9184e4e4e93448
The changes in the commit issue a
connclose(conn, "TLS close_notify");
when the FTP data channel is finished with the transfer, but this closes the whole FTP connection, including the control channel! Although the easy handle is reused, it has to authenticate again.
Solution: Maybe skip the changes of the above commit in the FTP case?