Skip to content

Commit b3a5e60

Browse files
Update curl from 7.77.0 to 7.78.0 (#2285)
1 parent 2f2cab5 commit b3a5e60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+8505
-7891
lines changed

vendor/curl/CHANGES

Lines changed: 5562 additions & 5301 deletions
Large diffs are not rendered by default.

vendor/curl/RELEASE-NOTES

Lines changed: 378 additions & 296 deletions
Large diffs are not rendered by default.

vendor/curl/include/curl/curl.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@
7474
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
7575
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
7676
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
77-
defined(__CYGWIN__) || defined(AMIGA) || \
78-
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
77+
defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
78+
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
79+
defined(__VXWORKS__)
7980
#include <sys/select.h>
8081
#endif
8182

@@ -541,7 +542,7 @@ typedef enum {
541542
CURLE_OBSOLETE46, /* 46 - NOT USED */
542543
CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */
543544
CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
544-
CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */
545+
CURLE_SETOPT_OPTION_SYNTAX, /* 49 - Malformed setopt option */
545546
CURLE_OBSOLETE50, /* 50 - NOT USED */
546547
CURLE_OBSOLETE51, /* 51 - NOT USED */
547548
CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
@@ -636,6 +637,9 @@ typedef enum {
636637
/* The following were added in 7.21.5, April 2011 */
637638
#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
638639

640+
/* Added for 7.78.0 */
641+
#define CURLE_TELNET_OPTION_SYNTAX CURLE_SETOPT_OPTION_SYNTAX
642+
639643
/* The following were added in 7.17.1 */
640644
/* These are scheduled to disappear by 2009 */
641645
#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
@@ -2084,13 +2088,13 @@ typedef enum {
20842088
/* Parameters for V4 signature */
20852089
CURLOPT(CURLOPT_AWS_SIGV4, CURLOPTTYPE_STRINGPOINT, 305),
20862090

2087-
/* Same as CURLOPT_SSL_VERIFYPEER but for DOH (DNS-over-HTTPS) servers. */
2091+
/* Same as CURLOPT_SSL_VERIFYPEER but for DoH (DNS-over-HTTPS) servers. */
20882092
CURLOPT(CURLOPT_DOH_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 306),
20892093

2090-
/* Same as CURLOPT_SSL_VERIFYHOST but for DOH (DNS-over-HTTPS) servers. */
2094+
/* Same as CURLOPT_SSL_VERIFYHOST but for DoH (DNS-over-HTTPS) servers. */
20912095
CURLOPT(CURLOPT_DOH_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 307),
20922096

2093-
/* Same as CURLOPT_SSL_VERIFYSTATUS but for DOH (DNS-over-HTTPS) servers. */
2097+
/* Same as CURLOPT_SSL_VERIFYSTATUS but for DoH (DNS-over-HTTPS) servers. */
20942098
CURLOPT(CURLOPT_DOH_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 308),
20952099

20962100
/* The CA certificates as "blob" used to validate the peer certificate

vendor/curl/include/curl/curlver.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030

3131
/* This is the version number of the libcurl package from which this header
3232
file origins: */
33-
#define LIBCURL_VERSION "7.77.0"
33+
#define LIBCURL_VERSION "7.78.0"
3434

3535
/* The numeric version number is also available "in parts" by using these
3636
defines: */
3737
#define LIBCURL_VERSION_MAJOR 7
38-
#define LIBCURL_VERSION_MINOR 77
38+
#define LIBCURL_VERSION_MINOR 78
3939
#define LIBCURL_VERSION_PATCH 0
4040

4141
/* This is the numeric version of the libcurl version number, meant for easier
@@ -57,7 +57,7 @@
5757
CURL_VERSION_BITS() macro since curl's own configure script greps for it
5858
and needs it to contain the full number.
5959
*/
60-
#define LIBCURL_VERSION_NUM 0x074d00
60+
#define LIBCURL_VERSION_NUM 0x074e00
6161

6262
/*
6363
* This is the date and time when the full source package was created. The
@@ -68,7 +68,7 @@
6868
*
6969
* "2007-11-23"
7070
*/
71-
#define LIBCURL_TIMESTAMP "2021-05-26"
71+
#define LIBCURL_TIMESTAMP "2021-07-21"
7272

7373
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
7474
#define CURL_AT_LEAST_VERSION(x,y,z) \

vendor/curl/include/curl/urlapi.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* | (__| |_| | _ <| |___
88
* \___|\___/|_| \_\_____|
99
*
10-
* Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
10+
* Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
@@ -79,6 +79,7 @@ typedef enum {
7979
#define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */
8080
#define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the
8181
scheme is unknown. */
82+
#define CURLU_ALLOW_SPACE (1<<11) /* Allow spaces in the URL */
8283

8384
typedef struct Curl_URL CURLU;
8485

vendor/curl/lib/altsvc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
8+
* Copyright (C) 2019 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -460,7 +460,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
460460
(void)data;
461461
#endif
462462
if(result) {
463-
infof(data, "Excessive alt-svc header, ignoring...\n");
463+
infof(data, "Excessive alt-svc header, ignoring.");
464464
return CURLE_OK;
465465
}
466466

@@ -496,7 +496,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
496496
p++;
497497
len = p - hostp;
498498
if(!len || (len >= MAX_ALTSVC_HOSTLEN)) {
499-
infof(data, "Excessive alt-svc host name, ignoring...\n");
499+
infof(data, "Excessive alt-svc host name, ignoring.");
500500
dstalpnid = ALPN_none;
501501
}
502502
else {
@@ -513,7 +513,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
513513
/* a port number */
514514
unsigned long port = strtoul(++p, &end_ptr, 10);
515515
if(port > USHRT_MAX || end_ptr == p || *end_ptr != '\"') {
516-
infof(data, "Unknown alt-svc port number, ignoring...\n");
516+
infof(data, "Unknown alt-svc port number, ignoring.");
517517
dstalpnid = ALPN_none;
518518
}
519519
p = end_ptr;
@@ -579,12 +579,12 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
579579
as->expires = maxage + time(NULL);
580580
as->persist = persist;
581581
Curl_llist_insert_next(&asi->list, asi->list.tail, as, &as->node);
582-
infof(data, "Added alt-svc: %s:%d over %s\n", dsthost, dstport,
582+
infof(data, "Added alt-svc: %s:%d over %s", dsthost, dstport,
583583
Curl_alpnid2str(dstalpnid));
584584
}
585585
}
586586
else {
587-
infof(data, "Unknown alt-svc protocol \"%s\", skipping...\n",
587+
infof(data, "Unknown alt-svc protocol \"%s\", skipping.",
588588
alpnbuf);
589589
}
590590
}

vendor/curl/lib/asyn-ares.c

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ static void destroy_async_data(struct Curl_async *async);
206206
*/
207207
void Curl_resolver_cancel(struct Curl_easy *data)
208208
{
209-
if(data && data->state.async.resolver)
209+
DEBUGASSERT(data);
210+
if(data->state.async.resolver)
210211
ares_cancel((ares_channel)data->state.async.resolver);
211212
destroy_async_data(&data->state.async);
212213
}
@@ -493,17 +494,31 @@ CURLcode Curl_resolver_wait_resolv(struct Curl_easy *data,
493494
static void compound_results(struct thread_data *res,
494495
struct Curl_addrinfo *ai)
495496
{
496-
struct Curl_addrinfo *ai_tail;
497497
if(!ai)
498498
return;
499-
ai_tail = ai;
500499

501-
while(ai_tail->ai_next)
502-
ai_tail = ai_tail->ai_next;
500+
#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
501+
if(res->temp_ai && res->temp_ai->ai_family == PF_INET6) {
502+
/* We have results already, put the new IPv6 entries at the head of the
503+
list. */
504+
struct Curl_addrinfo *temp_ai_tail = res->temp_ai;
503505

504-
/* Add the new results to the list of old results. */
505-
ai_tail->ai_next = res->temp_ai;
506-
res->temp_ai = ai;
506+
while(temp_ai_tail->ai_next)
507+
temp_ai_tail = temp_ai_tail->ai_next;
508+
509+
temp_ai_tail->ai_next = ai;
510+
}
511+
else
512+
#endif /* CURLRES_IPV6 */
513+
{
514+
/* Add the new results to the list of old results. */
515+
struct Curl_addrinfo *ai_tail = ai;
516+
while(ai_tail->ai_next)
517+
ai_tail = ai_tail->ai_next;
518+
519+
ai_tail->ai_next = res->temp_ai;
520+
res->temp_ai = ai;
521+
}
507522
}
508523

509524
/*

0 commit comments

Comments
 (0)