alexcrichton / curl-rust

Rust bindings to libcurl
MIT License
1.02k stars 233 forks source link

Exposed the CURLOPT_UPLOAD_BUFFERSIZE curl option. #411

Closed darkprokoba closed 3 years ago

darkprokoba commented 3 years ago

See also: https://curl.se/libcurl/c/CURLOPT_UPLOAD_BUFFERSIZE.html

alexcrichton commented 3 years ago

Looks good but I believe there's some CI errors.

darkprokoba commented 3 years ago

CI / Test (system-curl) (pull_request) Failing after 2m — Test (system-curl)

I guess this CI test uses libcurl earlier than 7.62.0... Perhaps in the test at tests/easy.rs:303 I could check the libcurl version and skip the h.upload_buffer_size(10) call?

if Version::get().version_num() >= 0x073e00 { // only available on 7.62.0 and later
    t!(h.upload_buffer_size(10));
}

Not sure how to go about this :-)

alexcrichton commented 3 years ago

Conditionally testing the version is fine, but it looks like you'll also need to update systest/build.rs with conditionally checking the constant itself.

darkprokoba commented 3 years ago

All checks have passed

Whew :-)