mirror of
https://github.com/curl/curl.git
synced 2026-07-25 10:07:57 +03:00
url: connection reuse fixes for starttls
Add test_31_13 to check connection reuse on mixed --ssl-reqd setting. For that add debug env var CURL_DBG_NO_USE_SSL_ON_FIRST to disable --ssl-reqd for the first url. Check that the connection without SSL from the first url is not reused on the second URL that requires it. Tweak special ftp: protocol check to fail a DEBUGASSERT on mismatched `use_ssl` settings as that should have been caught before in the connection reuse matching (imap/smtp etc. do not have this extra check and rely on the general part doing its job). Closes #21665
This commit is contained in:
parent
f1a6f190a6
commit
4ff212f8ed
5 changed files with 55 additions and 14 deletions
|
|
@ -951,6 +951,13 @@ CURLcode config2setopts(struct OperationConfig *config,
|
|||
result = ssl_setopts(config, curl);
|
||||
if(setopt_bad(result))
|
||||
return result;
|
||||
#ifdef DEBUGBUILD
|
||||
if(!per->urlnum) {
|
||||
char *env = getenv("CURL_DBG_NO_USE_SSL_ON_FIRST");
|
||||
if(env)
|
||||
my_setopt_enum(curl, CURLOPT_USE_SSL, CURLUSESSL_NONE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if(config->path_as_is)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue