Skip to content

Commit 602e918

Browse files
committed
Update curl to 8.1.2
1 parent b81eec8 commit 602e918

Some content is hidden

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

69 files changed

+1116
-1557
lines changed

vendor/curl/CHANGES

Lines changed: 594 additions & 565 deletions
Large diffs are not rendered by default.

vendor/curl/RELEASE-NOTES

Lines changed: 34 additions & 380 deletions
Large diffs are not rendered by default.

vendor/curl/include/curl/curlver.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232

3333
/* This is the version number of the libcurl package from which this header
3434
file origins: */
35-
#define LIBCURL_VERSION "8.1.0"
35+
#define LIBCURL_VERSION "8.1.2"
3636

3737
/* The numeric version number is also available "in parts" by using these
3838
defines: */
3939
#define LIBCURL_VERSION_MAJOR 8
4040
#define LIBCURL_VERSION_MINOR 1
41-
#define LIBCURL_VERSION_PATCH 0
41+
#define LIBCURL_VERSION_PATCH 2
4242

4343
/* This is the numeric version of the libcurl version number, meant for easier
4444
parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will
@@ -59,7 +59,7 @@
5959
CURL_VERSION_BITS() macro since curl's own configure script greps for it
6060
and needs it to contain the full number.
6161
*/
62-
#define LIBCURL_VERSION_NUM 0x080100
62+
#define LIBCURL_VERSION_NUM 0x080102
6363

6464
/*
6565
* This is the date and time when the full source package was created. The
@@ -70,7 +70,7 @@
7070
*
7171
* "2007-11-23"
7272
*/
73-
#define LIBCURL_TIMESTAMP "2023-05-17"
73+
#define LIBCURL_TIMESTAMP "2023-05-30"
7474

7575
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
7676
#define CURL_AT_LEAST_VERSION(x,y,z) \

vendor/curl/include/curl/easy.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ CURL_EXTERN void curl_easy_cleanup(CURL *curl);
4848
*
4949
* DESCRIPTION
5050
*
51-
* Request internal information from the curl session with this function. The
52-
* third argument MUST be a pointer to a long, a pointer to a char * or a
53-
* pointer to a double (as the documentation describes elsewhere). The data
54-
* pointed to will be filled in accordingly and can be relied upon only if the
55-
* function returns CURLE_OK. This function is intended to get used *AFTER* a
56-
* performed transfer, all results from this function are undefined until the
57-
* transfer is completed.
51+
* Request internal information from the curl session with this function.
52+
* The third argument MUST be pointing to the specific type of the used option
53+
* which is documented in each man page of the option. The data pointed to
54+
* will be filled in accordingly and can be relied upon only if the function
55+
* returns CURLE_OK. This function is intended to get used *AFTER* a performed
56+
* transfer, all results from this function are undefined until the transfer
57+
* is completed.
5858
*/
5959
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
6060

vendor/curl/lib/altsvc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static struct altsvc *altsvc_createid(const char *srchost,
117117
as->dst.port = curlx_ultous(dstport);
118118

119119
return as;
120-
error:
120+
error:
121121
altsvc_free(as);
122122
return NULL;
123123
}
@@ -217,7 +217,7 @@ static CURLcode altsvc_load(struct altsvcinfo *asi, const char *file)
217217
}
218218
return result;
219219

220-
fail:
220+
fail:
221221
Curl_safefree(asi->filename);
222222
free(line);
223223
fclose(fp);

vendor/curl/lib/asyn-thread.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ int init_thread_sync_data(struct thread_data *td,
251251

252252
return 1;
253253

254-
err_exit:
254+
err_exit:
255255
#ifndef CURL_DISABLE_SOCKETPAIR
256256
if(tsd->sock_pair[0] != CURL_SOCKET_BAD) {
257257
sclose(tsd->sock_pair[0]);
@@ -469,10 +469,10 @@ static bool init_resolve_thread(struct Curl_easy *data,
469469

470470
return TRUE;
471471

472-
err_exit:
472+
err_exit:
473473
destroy_async_data(asp);
474474

475-
errno_exit:
475+
errno_exit:
476476
errno = err;
477477
return FALSE;
478478
}

vendor/curl/lib/base64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ CURLcode Curl_base64_decode(const char *src,
178178
*outlen = rawlen;
179179

180180
return CURLE_OK;
181-
bad:
181+
bad:
182182
free(newstr);
183183
return CURLE_BAD_CONTENT_ENCODING;
184184
}

vendor/curl/lib/bufq.c

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ void Curl_bufcp_init(struct bufc_pool *pool,
181181
pool->spare_max = spare_max;
182182
}
183183

184-
CURLcode Curl_bufcp_take(struct bufc_pool *pool,
185-
struct buf_chunk **pchunk)
184+
static CURLcode bufcp_take(struct bufc_pool *pool,
185+
struct buf_chunk **pchunk)
186186
{
187187
struct buf_chunk *chunk = NULL;
188188

@@ -205,8 +205,8 @@ CURLcode Curl_bufcp_take(struct bufc_pool *pool,
205205
return CURLE_OK;
206206
}
207207

208-
void Curl_bufcp_put(struct bufc_pool *pool,
209-
struct buf_chunk *chunk)
208+
static void bufcp_put(struct bufc_pool *pool,
209+
struct buf_chunk *chunk)
210210
{
211211
if(pool->spare_count >= pool->spare_max) {
212212
free(chunk);
@@ -335,7 +335,7 @@ static struct buf_chunk *get_spare(struct bufq *q)
335335
return NULL;
336336

337337
if(q->pool) {
338-
if(Curl_bufcp_take(q->pool, &chunk))
338+
if(bufcp_take(q->pool, &chunk))
339339
return NULL;
340340
++q->chunk_count;
341341
return chunk;
@@ -360,7 +360,7 @@ static void prune_head(struct bufq *q)
360360
if(q->tail == chunk)
361361
q->tail = q->head;
362362
if(q->pool) {
363-
Curl_bufcp_put(q->pool, chunk);
363+
bufcp_put(q->pool, chunk);
364364
--q->chunk_count;
365365
}
366366
else if((q->chunk_count > q->max_chunks) ||
@@ -605,9 +605,18 @@ ssize_t Curl_bufq_sipn(struct bufq *q, size_t max_len,
605605
return nread;
606606
}
607607

608-
ssize_t Curl_bufq_slurpn(struct bufq *q, size_t max_len,
609-
Curl_bufq_reader *reader, void *reader_ctx,
610-
CURLcode *err)
608+
/**
609+
* Read up to `max_len` bytes and append it to the end of the buffer queue.
610+
* if `max_len` is 0, no limit is imposed and the call behaves exactly
611+
* the same as `Curl_bufq_slurp()`.
612+
* Returns the total amount of buf read (may be 0) or -1 on other
613+
* reader errors.
614+
* Note that even in case of a -1 chunks may have been read and
615+
* the buffer queue will have different length than before.
616+
*/
617+
static ssize_t bufq_slurpn(struct bufq *q, size_t max_len,
618+
Curl_bufq_reader *reader, void *reader_ctx,
619+
CURLcode *err)
611620
{
612621
ssize_t nread = 0, n;
613622

@@ -646,6 +655,5 @@ ssize_t Curl_bufq_slurpn(struct bufq *q, size_t max_len,
646655
ssize_t Curl_bufq_slurp(struct bufq *q, Curl_bufq_reader *reader,
647656
void *reader_ctx, CURLcode *err)
648657
{
649-
return Curl_bufq_slurpn(q, 0, reader, reader_ctx, err);
658+
return bufq_slurpn(q, 0, reader, reader_ctx, err);
650659
}
651-

vendor/curl/lib/bufq.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ struct bufc_pool {
6060
void Curl_bufcp_init(struct bufc_pool *pool,
6161
size_t chunk_size, size_t spare_max);
6262

63-
CURLcode Curl_bufcp_take(struct bufc_pool *pool,
64-
struct buf_chunk **pchunk);
65-
void Curl_bufcp_put(struct bufc_pool *pool,
66-
struct buf_chunk *chunk);
67-
6863
void Curl_bufcp_free(struct bufc_pool *pool);
6964

7065
/**
@@ -251,19 +246,6 @@ typedef ssize_t Curl_bufq_reader(void *reader_ctx,
251246
ssize_t Curl_bufq_slurp(struct bufq *q, Curl_bufq_reader *reader,
252247
void *reader_ctx, CURLcode *err);
253248

254-
/**
255-
* Read up to `max_len` bytes and append it to the end of the buffer queue.
256-
* if `max_len` is 0, no limit is imposed and the call behaves exactly
257-
* the same as `Curl_bufq_slurp()`.
258-
* Returns the total amount of buf read (may be 0) or -1 on other
259-
* reader errors.
260-
* Note that even in case of a -1 chunks may have been read and
261-
* the buffer queue will have different length than before.
262-
*/
263-
ssize_t Curl_bufq_slurpn(struct bufq *q, size_t max_len,
264-
Curl_bufq_reader *reader, void *reader_ctx,
265-
CURLcode *err);
266-
267249
/**
268250
* Read *once* up to `max_len` bytes and append it to the buffer.
269251
* if `max_len` is 0, no limit is imposed besides the chunk space.

vendor/curl/lib/c-hyper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
12121212
Curl_safefree(data->state.aptr.userpwd);
12131213
Curl_safefree(data->state.aptr.proxyuserpwd);
12141214
return CURLE_OK;
1215-
error:
1215+
error:
12161216
DEBUGASSERT(result);
12171217
if(io)
12181218
hyper_io_free(io);

0 commit comments

Comments
 (0)