diff --git a/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.md b/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.md index 02f0269902..18d6ff5898 100644 --- a/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.md +++ b/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.md @@ -58,9 +58,7 @@ the hostname from the URL is attempted instead. Failed connection problems that trigger this fallback: 1. bad addresses such as .onion 2. non-responsive servers -3. bad SSL -4. unsupported protocols -5. response appears to be the wrong protocol +3. connection issues ## CURLALTSVC_READONLYFILE diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index 5eed93efef..b4052d0357 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -198,8 +198,8 @@ CURL_ZERO_TERMINATED 7.56.0 CURLALTSVC_H1 7.64.1 CURLALTSVC_H2 7.64.1 CURLALTSVC_H3 7.64.1 -CURLALTSVC_READONLYFILE 7.64.1 CURLALTSVC_NO_RETRY 8.15.0 +CURLALTSVC_READONLYFILE 7.64.1 CURLAUTH_ANY 7.10.6 CURLAUTH_ANYSAFE 7.10.6 CURLAUTH_AWS_SIGV4 7.75.0 diff --git a/lib/multi.c b/lib/multi.c index b325a95b39..104e483418 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -54,11 +54,12 @@ #include "socketpair.h" #include "socks.h" #include "urlapi-int.h" + /* The last 3 #include files should be in this order */ #include "curl_printf.h" +#include "altsvc.h" /* seems this is needed in this order */ #include "curl_memory.h" #include "memdebug.h" -#include "altsvc.h" /* initial multi->xfers table size for a full multi */ #define CURL_XFER_TABLE_SIZE 512 @@ -2336,17 +2337,9 @@ static bool is_altsvc_error(CURLcode rc) case CURLE_COULDNT_RESOLVE_PROXY: case CURLE_COULDNT_RESOLVE_HOST: case CURLE_COULDNT_CONNECT: - case CURLE_HTTP2: - case CURLE_HTTP2_STREAM: - case CURLE_HTTP3: - case CURLE_QUIC_CONNECT_ERROR: - case CURLE_SSL_CONNECT_ERROR: case CURLE_GOT_NOTHING: case CURLE_SEND_ERROR: case CURLE_RECV_ERROR: - case CURLE_PROXY: - case CURLE_ECH_REQUIRED: - case CURLE_BAD_CONTENT_ENCODING: return true; default: @@ -2676,14 +2669,12 @@ do_connect: statemachine_end: /* maybe retry if altsvc is breaking */ #ifndef CURL_DISABLE_ALTSVC - if( - result && - data->asi && data->asi->used && !data->asi->errored - ) { + if(result && + data->asi && data->asi->used && !data->asi->errored) { data->asi->errored = is_altsvc_error(result); if(data->asi->errored && - !(data->asi->flags & CURLALTSVC_NO_RETRY) && + !(data->asi->flags & CURLALTSVC_NO_RETRY) && data->mstate <= MSTATE_PROTOCONNECTING && data->mstate >= MSTATE_CONNECT) { infof(data, "Alt-Svc connection failed(%d). " diff --git a/lib/url.c b/lib/url.c index 3dc7dfc2db..101ea7f78e 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3838,12 +3838,6 @@ CURLcode Curl_setup_conn(struct Curl_easy *data, DEBUGASSERT(dns); Curl_pgrsTime(data, TIMER_NAMELOOKUP); - if(conn->handler->flags & PROTOPT_NONETWORK) { - /* nothing to setup when not using a network */ - *protocol_done = TRUE; - return result; - } - if(!conn->bits.reuse) result = Curl_conn_setup(data, conn, FIRSTSOCKET, dns, CURL_CF_SSL_DEFAULT); diff --git a/tests/libtest/lib3303.c b/tests/libtest/lib3303.c index ac2d4319fb..5082906e59 100644 --- a/tests/libtest/lib3303.c +++ b/tests/libtest/lib3303.c @@ -27,7 +27,7 @@ /* testing the CURLALTSVC_NO_RETRY flag */ -static CURLcode test_lib3303(char *URL) +static CURLcode test_lib3303(const char *URL) { CURL *curl; CURLcode res = CURLE_OK;