fix(developer/read_image): send a User-Agent on URL image fetches (#9927)

This commit is contained in:
Jude Edwards
2026-06-22 11:48:34 -07:00
committed by GitHub
parent e944dccf54
commit 0b9ef09a30
@@ -180,6 +180,11 @@ async fn load_image_bytes(source: &str, working_dir: Option<&Path>) -> Result<Ve
async fn load_url_bytes(url: url::Url) -> Result<Vec<u8>, String> {
let client = reqwest::Client::builder()
.user_agent(concat!(
"goose/",
env!("CARGO_PKG_VERSION"),
" (+https://github.com/aaif-goose/goose)"
))
.timeout(Duration::from_secs(30))
.build()
.map_err(|error| format!("failed to create HTTP client: {error}"))?;