]> git.ipfire.org Git - thirdparty/curl.git/commit
conn: fix connection reuse when SSL is optional
authorStefan Eissing <stefan@eissing.org>
Wed, 19 Feb 2025 09:52:34 +0000 (10:52 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 20 Feb 2025 15:23:35 +0000 (16:23 +0100)
commitdf5db8afaf0551768df44dea13b51fe798c3ba47
treec3dc5c5895370af6c0f45d48fe452acc2759ebb4
parentf78700814d702c523a7a2c3766a1ca60f3db7edc
conn: fix connection reuse when SSL is optional

In curl 8.12 I tried to improve the logic on how we handle connections
that "upgrade" to TLS later, e.g. with a STARTTLS. I found the existing
code hard to read in this regard. But of course, the "improvements" blew
up in my face.

We fixed issues with imap, opo3, smtp in 8.12.1, but ftp was no longer
reusing existing, upgraded control connections as before. This PR adds
checks in our pytest FTP tests that verify reuse is happening as
intended.

I rewrote the logic in url.c again, so that the new test checks now pass.

Reported-by: Zenju on github
Fixes #16384
Closes #16392
lib/imap.c
lib/openldap.c
lib/pop3.c
lib/smtp.c
lib/url.c
lib/urldata.h
tests/http/Makefile.am
tests/http/test_30_vsftpd.py
tests/http/test_31_vsftpds.py
tests/http/test_32_ftps_vsftpd.py [new file with mode: 0644]
tests/http/testenv/vsftpd.py