diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml index 88f2a3b3a..79e0f3b69 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curl-sys" -version = "0.4.67+curl-8.3.0" +version = "0.4.68+curl-8.4.0" authors = ["Alex Crichton "] links = "curl" build = "build.rs" diff --git a/curl-sys/build.rs b/curl-sys/build.rs index 6c3ae1920..74f601b36 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.3.0"), + .replace("@CURLVERSION@", "8.4.0"), ) .unwrap(); diff --git a/curl-sys/curl b/curl-sys/curl index 6fa1d817e..d755a5f7c 160000 --- a/curl-sys/curl +++ b/curl-sys/curl @@ -1 +1 @@ -Subproject commit 6fa1d817e5b1a00d7d0c8168091877476b499317 +Subproject commit d755a5f7c009dd63a61b2c745180d8ba937cbfeb diff --git a/tests/multi.rs b/tests/multi.rs index 0c5e70150..c1e68f4a5 100644 --- a/tests/multi.rs +++ b/tests/multi.rs @@ -140,7 +140,6 @@ fn upload_lots() { let e = t!(m.add(h)); - assert!(t!(m.perform()) > 0); let mut next_token = 1; let mut token_map = HashMap::new(); let mut cur_timeout = None; diff --git a/tests/post.rs b/tests/post.rs index 15e2df7d3..3e2db5cdd 100644 --- a/tests/post.rs +++ b/tests/post.rs @@ -1,3 +1,4 @@ +use curl::Version; use std::time::Duration; macro_rules! t { @@ -23,15 +24,26 @@ fn handle() -> Easy { e } +fn multipart_boundary_size() -> usize { + // Versions before 8.4.0 used a smaller multipart mime boundary, so the + // exact content-length will differ between versions. + if Version::get().version_num() >= 0x80400 { + 148 + } else { + 136 + } +} + #[test] fn custom() { + multipart_boundary_size(); let s = Server::new(); - s.receive( + s.receive(&format!( "\ POST / HTTP/1.1\r\n\ Host: 127.0.0.1:$PORT\r\n\ Accept: */*\r\n\ - Content-Length: 142\r\n\ + Content-Length: {}\r\n\ Content-Type: multipart/form-data; boundary=--[..]\r\n\ \r\n\ --[..]\r\n\ @@ -39,7 +51,8 @@ fn custom() { \r\n\ 1234\r\n\ --[..]\r\n", - ); + multipart_boundary_size() + 6 + )); s.send("HTTP/1.1 200 OK\r\n\r\n"); let mut handle = handle(); @@ -50,15 +63,16 @@ fn custom() { t!(handle.perform()); } +#[cfg(feature = "static-curl")] #[test] fn buffer() { let s = Server::new(); - s.receive( + s.receive(&format!( "\ POST / HTTP/1.1\r\n\ Host: 127.0.0.1:$PORT\r\n\ Accept: */*\r\n\ - Content-Length: 181\r\n\ + Content-Length: {}\r\n\ Content-Type: multipart/form-data; boundary=--[..]\r\n\ \r\n\ --[..]\r\n\ @@ -67,7 +81,8 @@ fn buffer() { \r\n\ 1234\r\n\ --[..]\r\n", - ); + multipart_boundary_size() + 45 + )); s.send("HTTP/1.1 200 OK\r\n\r\n"); let mut handle = handle(); @@ -82,6 +97,7 @@ fn buffer() { t!(handle.perform()); } +#[cfg(feature = "static-curl")] #[test] fn file() { let s = Server::new(); @@ -102,7 +118,7 @@ fn file() { {}\ \r\n\ --[..]\r\n", - 199 + formdata.len(), + multipart_boundary_size() + 63 + formdata.len(), formdata ) .as_str(),