Use HEAD to check remote exists

This commit is contained in:
Félix Saparelli 2022-02-16 00:29:38 +13:00
parent 50ac8d0847
commit c6e5a96fa3
No known key found for this signature in database
GPG key ID: B948C4BAE44FC474
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ impl super::Fetcher for GhCrateMeta {
async fn check(&self) -> Result<bool, anyhow::Error> {
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> {

View file

@ -21,7 +21,7 @@ impl super::Fetcher for QuickInstall {
async fn check(&self) -> Result<bool, anyhow::Error> {
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> {