mirror of
https://github.com/curl/curl.git
synced 2026-07-28 09:03:06 +03:00
more limited retries for security
small fix Update docs/libcurl/symbols-in-versions Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com> Update lib/multi.c Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com> Update lib/multi.c Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com> removing residual? fixing nasty include order bug include order seems to still be an issue Remove empty line Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com>
This commit is contained in:
parent
ed1f181013
commit
471fd5d8e0
5 changed files with 8 additions and 25 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
19
lib/multi.c
19
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). "
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue