Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ureq #919

Merged
merged 3 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcnb-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ thiserror = "2.0.11"
[dev-dependencies]
indoc = "2.0.5"
libcnb.workspace = true
ureq = { version = "2.12.1", default-features = false }
ureq = { version = "3.0.7", default-features = false }
4 changes: 2 additions & 2 deletions libcnb-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ fn starting_web_server_container() {
&format!("Listening on port {TEST_PORT}")
);

let response = ureq::get(&url).call().unwrap();
let body = response.into_string().unwrap();
let mut response = ureq::get(&url).call().unwrap();
let body = response.body_mut().read_to_string().unwrap();
assert_contains!(body, "Expected response substring");
},
);
Expand Down
4 changes: 2 additions & 2 deletions libcnb-test/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ fn starting_containers() {

// Retries needed since the server takes a moment to start up.
let mut attempts_remaining = 5;
let response = loop {
let mut response = loop {
let response = ureq::get(&url).call();
if response.is_ok() || attempts_remaining == 0 {
break response;
Expand All @@ -483,7 +483,7 @@ fn starting_containers() {
}
.unwrap();

let body = response.into_string().unwrap();
let body = response.body_mut().read_to_string().unwrap();
assert_contains!(body, "Directory listing for /");

let server_log_output = container.logs_now();
Expand Down
2 changes: 1 addition & 1 deletion libherokubuildpack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tar = { version = "0.4.44", default-features = false, optional = true }
termcolor = { version = "1.4.1", optional = true }
thiserror = { version = "2.0.11", optional = true }
toml = { workspace = true, optional = true }
ureq = { version = "2.12.1", default-features = false, features = ["tls"], optional = true }
ureq = { version = "3.0.7", default-features = false, features = ["rustls"], optional = true }

[dev-dependencies]
serde_test = "1.0.177"
Expand Down
2 changes: 1 addition & 1 deletion libherokubuildpack/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn download_file(
destination: impl AsRef<std::path::Path>,
) -> Result<(), DownloadError> {
let response = ureq::get(uri.as_ref()).call().map_err(Box::new)?;
let mut reader = response.into_reader();
let mut reader = response.into_body().into_reader();
let mut file = fs::File::create(destination.as_ref())?;
io::copy(&mut reader, &mut file)?;

Expand Down
Loading