From 9cfd9a7bf22633a7c5471d4e907c812b9a4e1fd0 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 26 Jun 2024 07:24:32 -0700 Subject: [PATCH] Update curl to 8.8.0 (#562) --- curl-sys/Cargo.toml | 4 ++-- curl-sys/build.rs | 6 ++++-- curl-sys/curl | 2 +- tests/easy.rs | 33 ++++++++++++++++++++------------- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml index 03ab6178d..f20e60702 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl-sys" -version = "0.4.72+curl-8.6.0" +version = "0.4.73+curl-8.8.0" authors = ["Alex Crichton "] links = "curl" build = "build.rs" @@ -26,7 +26,7 @@ libc = "0.2.2" libnghttp2-sys = { optional = true, version = "0.1.3" } [dependencies.rustls-ffi] -version = "0.8" +version = "0.13" optional = true features = ["no_log_capture"] diff --git a/curl-sys/build.rs b/curl-sys/build.rs index 7cc583158..407bc25a2 100644 --- a/curl-sys/build.rs +++ b/curl-sys/build.rs @@ -100,7 +100,7 @@ fn main() { .replace("@LIBCURL_LIBS@", "") .replace("@SUPPORT_FEATURES@", "") .replace("@SUPPORT_PROTOCOLS@", "") - .replace("@CURLVERSION@", "8.6.0"), + .replace("@CURLVERSION@", "8.8.0"), ) .unwrap(); @@ -147,8 +147,10 @@ fn main() { .file("curl/lib/curl_get_line.c") .file("curl/lib/curl_memrchr.c") .file("curl/lib/curl_range.c") + .file("curl/lib/curl_sha512_256.c") .file("curl/lib/curl_threads.c") .file("curl/lib/curl_trc.c") + .file("curl/lib/cw-out.c") .file("curl/lib/doh.c") .file("curl/lib/dynbuf.c") .file("curl/lib/dynhds.c") @@ -191,6 +193,7 @@ fn main() { .file("curl/lib/progress.c") .file("curl/lib/rand.c") .file("curl/lib/rename.c") + .file("curl/lib/request.c") .file("curl/lib/select.c") .file("curl/lib/sendf.c") .file("curl/lib/setopt.c") @@ -234,7 +237,6 @@ fn main() { .file("curl/lib/curl_endian.c") .file("curl/lib/curl_gethostname.c") .file("curl/lib/curl_ntlm_core.c") - .file("curl/lib/curl_ntlm_wb.c") .file("curl/lib/http_ntlm.c") .file("curl/lib/md4.c") .file("curl/lib/vauth/ntlm.c") diff --git a/curl-sys/curl b/curl-sys/curl index 5ce164e0e..fd567d4f0 160000 --- a/curl-sys/curl +++ b/curl-sys/curl @@ -1 +1 @@ -Subproject commit 5ce164e0e9290c96eb7d502173426c0a135ec008 +Subproject commit fd567d4f06857f4fc8e2f64ea727b1318f76ad33 diff --git a/tests/easy.rs b/tests/easy.rs index 00e4e1e89..625735936 100644 --- a/tests/easy.rs +++ b/tests/easy.rs @@ -780,19 +780,26 @@ fn panic_in_callback() { #[test] fn abort_read() { let s = Server::new(); - s.receive( - "\ - PUT / HTTP/1.1\r\n\ - Host: 127.0.0.1:$PORT\r\n\ - Accept: */*\r\n\ - Content-Length: 2\r\n\ - \r\n", - ); - s.send( - "\ - HTTP/1.1 200 OK\r\n\ - \r\n", - ); + // 8.7.0 seems to have changed the behavior that curl will call the read + // function before sending headers (I'm guessing so that it batches + // everything up into a single write). + if Version::get().version_num() < 0x080700 { + s.receive( + "\ + PUT / HTTP/1.1\r\n\ + Host: 127.0.0.1:$PORT\r\n\ + Accept: */*\r\n\ + Content-Length: 2\r\n\ + \r\n", + ); + s.send( + "\ + HTTP/1.1 200 OK\r\n\ + \r\n", + ); + } else { + s.receive(""); + } let mut h = handle(); t!(h.url(&s.url("/")));