Skip to content

Commit de57280

Browse files
authored
Merge pull request #532 from ecnelises/8_4_0
Update to curl 8.4.0
2 parents 4f10982 + 6b7e62b commit de57280

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

curl-sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "curl-sys"
3-
version = "0.4.67+curl-8.3.0"
3+
version = "0.4.68+curl-8.4.0"
44
authors = ["Alex Crichton <[email protected]>"]
55
links = "curl"
66
build = "build.rs"

curl-sys/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn main() {
100100
.replace("@LIBCURL_LIBS@", "")
101101
.replace("@SUPPORT_FEATURES@", "")
102102
.replace("@SUPPORT_PROTOCOLS@", "")
103-
.replace("@CURLVERSION@", "8.3.0"),
103+
.replace("@CURLVERSION@", "8.4.0"),
104104
)
105105
.unwrap();
106106

curl-sys/curl

Submodule curl updated 2020 files

tests/multi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ fn upload_lots() {
140140

141141
let e = t!(m.add(h));
142142

143-
assert!(t!(m.perform()) > 0);
144143
let mut next_token = 1;
145144
let mut token_map = HashMap::new();
146145
let mut cur_timeout = None;

tests/post.rs

+23-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use curl::Version;
12
use std::time::Duration;
23

34
macro_rules! t {
@@ -23,23 +24,35 @@ fn handle() -> Easy {
2324
e
2425
}
2526

27+
fn multipart_boundary_size() -> usize {
28+
// Versions before 8.4.0 used a smaller multipart mime boundary, so the
29+
// exact content-length will differ between versions.
30+
if Version::get().version_num() >= 0x80400 {
31+
148
32+
} else {
33+
136
34+
}
35+
}
36+
2637
#[test]
2738
fn custom() {
39+
multipart_boundary_size();
2840
let s = Server::new();
29-
s.receive(
41+
s.receive(&format!(
3042
"\
3143
POST / HTTP/1.1\r\n\
3244
Host: 127.0.0.1:$PORT\r\n\
3345
Accept: */*\r\n\
34-
Content-Length: 142\r\n\
46+
Content-Length: {}\r\n\
3547
Content-Type: multipart/form-data; boundary=--[..]\r\n\
3648
\r\n\
3749
--[..]\r\n\
3850
Content-Disposition: form-data; name=\"foo\"\r\n\
3951
\r\n\
4052
1234\r\n\
4153
--[..]\r\n",
42-
);
54+
multipart_boundary_size() + 6
55+
));
4356
s.send("HTTP/1.1 200 OK\r\n\r\n");
4457

4558
let mut handle = handle();
@@ -50,15 +63,16 @@ fn custom() {
5063
t!(handle.perform());
5164
}
5265

66+
#[cfg(feature = "static-curl")]
5367
#[test]
5468
fn buffer() {
5569
let s = Server::new();
56-
s.receive(
70+
s.receive(&format!(
5771
"\
5872
POST / HTTP/1.1\r\n\
5973
Host: 127.0.0.1:$PORT\r\n\
6074
Accept: */*\r\n\
61-
Content-Length: 181\r\n\
75+
Content-Length: {}\r\n\
6276
Content-Type: multipart/form-data; boundary=--[..]\r\n\
6377
\r\n\
6478
--[..]\r\n\
@@ -67,7 +81,8 @@ fn buffer() {
6781
\r\n\
6882
1234\r\n\
6983
--[..]\r\n",
70-
);
84+
multipart_boundary_size() + 45
85+
));
7186
s.send("HTTP/1.1 200 OK\r\n\r\n");
7287

7388
let mut handle = handle();
@@ -82,6 +97,7 @@ fn buffer() {
8297
t!(handle.perform());
8398
}
8499

100+
#[cfg(feature = "static-curl")]
85101
#[test]
86102
fn file() {
87103
let s = Server::new();
@@ -102,7 +118,7 @@ fn file() {
102118
{}\
103119
\r\n\
104120
--[..]\r\n",
105-
199 + formdata.len(),
121+
multipart_boundary_size() + 63 + formdata.len(),
106122
formdata
107123
)
108124
.as_str(),

0 commit comments

Comments
 (0)