mirror of
https://github.com/v0l/route96.git
synced 2025-06-22 05:32:50 +00:00
chore: more mirror logging
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -244,14 +244,16 @@ async fn mirror(
|
||||
.and_then(|mut c| c.next_back())
|
||||
.and_then(|s| s.split(".").next());
|
||||
|
||||
let client = Client::builder()
|
||||
.user_agent(format!("route96 ({})", settings.public_url))
|
||||
.build()
|
||||
.unwrap();
|
||||
let client = Client::builder().build().unwrap();
|
||||
|
||||
let req = client
|
||||
.get(url.clone())
|
||||
.header("user-agent", format!("route96 ({})", settings.public_url));
|
||||
info!("Requesting mirror: {}", url);
|
||||
info!("{:?}", req);
|
||||
|
||||
// download file
|
||||
let rsp = match client.get(url.clone()).send().await {
|
||||
let rsp = match req.send().await {
|
||||
Err(e) => {
|
||||
error!("Error downloading file: {}", e);
|
||||
return BlossomResponse::error("Failed to mirror file");
|
||||
|
Reference in New Issue
Block a user