From c6e5a96fa3e7d79e2dbc669cd2fd00d06d2e2ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Wed, 16 Feb 2022 00:29:38 +1300 Subject: [PATCH] Use HEAD to check remote exists --- src/fetchers/gh_crate_meta.rs | 2 +- src/fetchers/quickinstall.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fetchers/gh_crate_meta.rs b/src/fetchers/gh_crate_meta.rs index 8a5028a9..1b3164d4 100644 --- a/src/fetchers/gh_crate_meta.rs +++ b/src/fetchers/gh_crate_meta.rs @@ -33,7 +33,7 @@ impl super::Fetcher for GhCrateMeta { async fn check(&self) -> Result { info!("Checking for package at: '{}'", self.url); - remote_exists(&self.url, Method::OPTIONS).await + remote_exists(&self.url, Method::HEAD).await } async fn fetch(&self, dst: &Path) -> Result<(), anyhow::Error> { diff --git a/src/fetchers/quickinstall.rs b/src/fetchers/quickinstall.rs index 6ab9a812..c4765af9 100644 --- a/src/fetchers/quickinstall.rs +++ b/src/fetchers/quickinstall.rs @@ -21,7 +21,7 @@ impl super::Fetcher for QuickInstall { async fn check(&self) -> Result { info!("Checking for package at: '{}'", self.url); - remote_exists(&self.url, Method::OPTIONS).await + remote_exists(&self.url, Method::HEAD).await } async fn fetch(&self, dst: &Path) -> Result<(), anyhow::Error> {