Skip to content

Commit c7a02a7

Browse files
committed
Update curl to v8.7.1
1 parent aa1791e commit c7a02a7

4 files changed

+80
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ the requirements.
5656
| [nghttp3](https://github.com/ngtcp2/nghttp3) | 1.2.0 | 2024-02-16 |
5757
| [ngtcp2](https://github.com/ngtcp2/ngtcp2) | 1.4.0 | 2024-03-18 |
5858
| [c-ares](https://c-ares.org) | 1.28.1 | 2024-03-30 |
59-
| [curl](https://curl.se) | 8.6.0 | 2024-01-30 |
59+
| [curl](https://curl.se) | 8.7.1 | 2024-03-27 |
6060
| [libxml2](http://xmlsoft.org) | 2.12.6 | 2024-03-15 |
6161
| [libxslt](http://xmlsoft.org/libxslt) | 1.1.39 | 2023-11-16 |
6262
| [lcms](https://www.littlecms.com/) | 2.16.0 | 2023-12-03 |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
From 589ecdc0783ef8877ae5210e41f29a2be65992e7 Mon Sep 17 00:00:00 2001
2+
From: Stefan Eissing <stefan@eissing.org>
3+
Date: Thu, 28 Mar 2024 11:08:15 +0100
4+
Subject: [PATCH] content_encoding: brotli and others, pass through 0-length
5+
writes
6+
7+
- curl's transfer handling may write 0-length chunks at the end of the
8+
download with an EOS flag. (HTTP/2 does this commonly)
9+
10+
- content encoders need to pass-through such a write and not count this
11+
as error in case they are finished decoding
12+
13+
Fixes #13209
14+
Fixes #13212
15+
Closes #13219
16+
---
17+
lib/content_encoding.c | 10 +++++-----
18+
tests/http/test_02_download.py | 13 +++++++++++++
19+
tests/http/testenv/env.py | 7 ++++++-
20+
tests/http/testenv/httpd.py | 20 ++++++++++++++++++++
21+
4 files changed, 44 insertions(+), 6 deletions(-)
22+
23+
diff --git a/lib/content_encoding.c b/lib/content_encoding.c
24+
index c1abf24e8..8e926dd2e 100644
25+
--- a/lib/content_encoding.c
26+
+++ b/lib/content_encoding.c
27+
@@ -300,7 +300,7 @@ static CURLcode deflate_do_write(struct Curl_easy *data,
28+
struct zlib_writer *zp = (struct zlib_writer *) writer;
29+
z_stream *z = &zp->z; /* zlib state structure */
30+
31+
- if(!(type & CLIENTWRITE_BODY))
32+
+ if(!(type & CLIENTWRITE_BODY) || !nbytes)
33+
return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
34+
35+
/* Set the compressed input when this function is called */
36+
@@ -457,7 +457,7 @@ static CURLcode gzip_do_write(struct Curl_easy *data,
37+
struct zlib_writer *zp = (struct zlib_writer *) writer;
38+
z_stream *z = &zp->z; /* zlib state structure */
39+
40+
- if(!(type & CLIENTWRITE_BODY))
41+
+ if(!(type & CLIENTWRITE_BODY) || !nbytes)
42+
return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
43+
44+
if(zp->zlib_init == ZLIB_INIT_GZIP) {
45+
@@ -669,7 +669,7 @@ static CURLcode brotli_do_write(struct Curl_easy *data,
46+
CURLcode result = CURLE_OK;
47+
BrotliDecoderResult r = BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT;
48+
49+
- if(!(type & CLIENTWRITE_BODY))
50+
+ if(!(type & CLIENTWRITE_BODY) || !nbytes)
51+
return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
52+
53+
if(!bp->br)
54+
@@ -762,7 +762,7 @@ static CURLcode zstd_do_write(struct Curl_easy *data,
55+
ZSTD_outBuffer out;
56+
size_t errorCode;
57+
58+
- if(!(type & CLIENTWRITE_BODY))
59+
+ if(!(type & CLIENTWRITE_BODY) || !nbytes)
60+
return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
61+
62+
if(!zp->decomp) {
63+
@@ -916,7 +916,7 @@ static CURLcode error_do_write(struct Curl_easy *data,
64+
(void) buf;
65+
(void) nbytes;
66+
67+
- if(!(type & CLIENTWRITE_BODY))
68+
+ if(!(type & CLIENTWRITE_BODY) || !nbytes)
69+
return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
70+
71+
failf(data, "Unrecognized content encoding type. "
72+
--
73+
2.44.0.windows.1
74+

ports/curl/portfile.cmake

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
set(VERSION 8.6.0)
1+
set(VERSION 8.7.1)
22
string(REPLACE "." "_" TAG ${VERSION})
33

44
# Get archive
55
vcpkg_download_distfile(ARCHIVE
66
URLS "https://github.com/curl/curl/releases/download/curl-${TAG}/curl-${VERSION}.zip"
77
FILENAME "curl-${VERSION}.zip"
8-
SHA512 f5f4b966b3bd379617d2f6d62513fa674f302c817c58903284f8aaeac6f1f1d62970def0b78d7f13341b6862b95e3ad6055d2dc62563eba22911981e17daa9cc
8+
SHA512 640bf8cf7ab68470d1a15c2a85c32849f7f2de85e4d4b1e403c7ee3c849a9ac797640ff0e4e3f9a24cf2aed449e0dc46934a7b32326f5381b3216acc3589a063
99
)
1010

1111
# Patches
1212
set(PATCHES
1313
${CMAKE_CURRENT_LIST_DIR}/patches/0001-Adjust-CMake-for-vcpkg.patch
14+
# Remove in next release
15+
${CMAKE_CURRENT_LIST_DIR}/patches/0002-content_encoding-brotli-and-others-pass-through-0-le.patch
1416
)
1517

1618
# Extract archive

ports/curl/vcpkg.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "curl",
3-
"version": "8.6.0",
3+
"version": "8.7.1",
44
"description": "A library for transferring data with URLs",
55
"homepage": "https://curl.se/",
66
"dependencies": [

0 commit comments

Comments
 (0)