Skip to content

Update curl to 8.15.0 #4358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions vendor/curl/CMake/CurlTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ int main(void)
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#ifndef _WIN32
# include <sys/socket.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
Expand All @@ -230,7 +230,7 @@ int main(void)
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#ifndef _WIN32
# include <sys/socket.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
Expand All @@ -257,7 +257,7 @@ int main(void)
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#ifndef _WIN32
# include <sys/socket.h>
#endif
int main(void)
Expand Down
447 changes: 364 additions & 83 deletions vendor/curl/RELEASE-NOTES

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions vendor/curl/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
#
# SPDX-License-Identifier: curl

*.1
*.3
RELEASE-TOOLS.md.dist
5 changes: 5 additions & 0 deletions vendor/curl/docs/cmdline-opts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
#
# SPDX-License-Identifier: curl

curl.txt
134 changes: 134 additions & 0 deletions vendor/curl/docs/examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
#
# SPDX-License-Identifier: curl

10-at-a-time
address-scope
altsvc
anyauthput
block_ip
cacertinmem
certinfo
chkspeed
connect-to
cookie_interface
crawler
debug
default-scheme
ephiperfifo
evhiperfifo
externalsocket
fileupload
ftp-delete
ftp-wildcard
ftpget
ftpgetinfo
ftpgetresp
ftpsget
ftpupload
ftpuploadfrommem
ftpuploadresume
getinfo
getinmemory
getredirect
getreferrer
ghiper
headerapi
hiperfifo
href_extractor
hsts-preload
htmltidy
http-options
http-post
http2-download
http2-pushinmemory
http2-serverpush
http2-upload
http3
http3-present
httpcustomheader
httpput
httpput-postfields
https
imap-append
imap-authzid
imap-copy
imap-create
imap-delete
imap-examine
imap-fetch
imap-list
imap-lsub
imap-multi
imap-noop
imap-search
imap-ssl
imap-store
imap-tls
interface
ipv6
keepalive
localport
maxconnects
multi-app
multi-debugcallback
multi-double
multi-event
multi-formadd
multi-legacy
multi-post
multi-single
multi-uv
multithread
netrc
parseurl
persistent
pop3-authzid
pop3-dele
pop3-list
pop3-multi
pop3-noop
pop3-retr
pop3-ssl
pop3-stat
pop3-tls
pop3-top
pop3-uidl
post-callback
postinmemory
postit2
postit2-formadd
progressfunc
protofeats
range
resolve
rtsp-options
sendrecv
sepheaders
sessioninfo
sftpget
sftpuploadresume
shared-connection-cache
simple
simplepost
simplessl
smooth-gtk-thread
smtp-authzid
smtp-expn
smtp-mail
smtp-mime
smtp-multi
smtp-ssl
smtp-tls
smtp-vrfy
sslbackend
synctime
threaded-ssl
unixsocket
url2file
urlapi
usercertinmem
websocket
websocket-cb
websocket-updown
xmlstream
4 changes: 2 additions & 2 deletions vendor/curl/docs/examples/altsvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc.txt");

/* restrict which HTTP versions to use alternatives */
curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long)
CURLALTSVC_H1|CURLALTSVC_H2|CURLALTSVC_H3);
curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL,
CURLALTSVC_H1 | CURLALTSVC_H2 | CURLALTSVC_H3);

/* Perform the request, res gets the return code */
res = curl_easy_perform(curl);
Expand Down
4 changes: 2 additions & 2 deletions vendor/curl/docs/examples/anyauthput.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int my_seek(void *userp, curl_off_t offset, int origin)
{
FILE *fp = (FILE *) userp;

if(-1 == fseek(fp, (long) offset, origin))
if(fseek(fp, (long) offset, origin) == -1)
/* could not seek */
return CURL_SEEKFUNC_CANTSEEK;

Expand Down Expand Up @@ -142,7 +142,7 @@ int main(int argc, char **argv)
/* tell libcurl we can use "any" auth, which lets the lib pick one, but it
also costs one extra round-trip and possibly sending of all the PUT
data twice!!! */
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);

/* set user name and password for the authentication */
curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
Expand Down
2 changes: 1 addition & 1 deletion vendor/curl/docs/examples/block_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static struct ip *ip_list_append(struct ip *list, const char *data)
ip->maskbits = 128;
#endif

if(1 != inet_pton(ip->family, ip->str, &ip->netaddr)) {
if(inet_pton(ip->family, ip->str, &ip->netaddr) != 1) {
free(ip->str);
free(ip);
return NULL;
Expand Down
59 changes: 19 additions & 40 deletions vendor/curl/docs/examples/cacertinmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,60 +41,39 @@ static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
return nmemb * size;
}

static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm)
static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
{
CURLcode rv = CURLE_ABORTED_BY_CALLBACK;

/** This example uses two (fake) certificates **/
/* replace the XXX with the actual CA certificates */
static const char mypem[] =
"-----BEGIN CERTIFICATE-----\n"
"MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE\n"
"AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw\n"
"CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQ\n"
"BgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwHUEtJQUNDVjENMAsGA1UECgwEQUND\n"
"VjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCb\n"
"qau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gMjmoY\n"
"HtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWo\n"
"G2ioPej0RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpA\n"
"0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDGWuzndN9wrqODJerWx5eH\n"
"k6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs78yM2x/47\n"
"JyCpZET/LtZ1qmxNYEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+m\n"
"AM/EKXMRNt6GGT6d7hmKG9Ww7Y49nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepD\n"
"vV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJTS+xJlsndQAJxGJ3KQhfnlms\n"
"tn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3sCPdK6jT2iWH\n"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XXXXXXXXXXXXXXXXXXXXXX\n"\
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
"-----END CERTIFICATE-----\n";

BIO *cbio = BIO_new_mem_buf(mypem, sizeof(mypem));
X509_STORE *cts = SSL_CTX_get_cert_store((SSL_CTX *)sslctx);
int i;
STACK_OF(X509_INFO) *inf;
(void)curl;
(void)parm;

(void)curl; /* avoid warnings */
(void)pointer; /* avoid warnings */

if(!cts || !cbio) {
return rv;
Expand Down
15 changes: 8 additions & 7 deletions vendor/curl/docs/examples/crawler.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ static void sighandler(int dummy)
}

/* resizable buffer */
typedef struct {
struct memory {
char *buf;
size_t size;
} memory;
};

static size_t grow_buffer(void *contents, size_t sz, size_t nmemb, void *ctx)
{
size_t realsize = sz * nmemb;
memory *mem = (memory*) ctx;
struct memory *mem = (struct memory*) ctx;
char *ptr = realloc(mem->buf, mem->size + realsize);
if(!ptr) {
/* out of memory */
Expand All @@ -79,14 +79,14 @@ static size_t grow_buffer(void *contents, size_t sz, size_t nmemb, void *ctx)
static CURL *make_handle(const char *url)
{
CURL *handle = curl_easy_init();
memory *mem;
struct memory *mem;

/* Important: use HTTP2 over HTTPS */
curl_easy_setopt(handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
curl_easy_setopt(handle, CURLOPT_URL, url);

/* buffer body */
mem = malloc(sizeof(memory));
mem = malloc(sizeof(*mem));
mem->size = 0;
mem->buf = malloc(1);
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, grow_buffer);
Expand Down Expand Up @@ -119,7 +119,8 @@ static CURL *make_handle(const char *url)
}

/* HREF finder implemented in libxml2 but could be any HTML parser */
static size_t follow_links(CURLM *multi_handle, memory *mem, const char *url)
static size_t follow_links(CURLM *multi_handle, struct memory *mem,
const char *url)
{
int opts = HTML_PARSE_NOBLANKS | HTML_PARSE_NOERROR | \
HTML_PARSE_NOWARNING | HTML_PARSE_NONET;
Expand Down Expand Up @@ -213,7 +214,7 @@ int main(void)
if(m->msg == CURLMSG_DONE) {
CURL *handle = m->easy_handle;
char *url;
memory *mem;
struct memory *mem;
curl_easy_getinfo(handle, CURLINFO_PRIVATE, &mem);
curl_easy_getinfo(handle, CURLINFO_EFFECTIVE_URL, &url);
if(m->data.result == CURLE_OK) {
Expand Down
Loading
Loading