From c8c6a963c09571117bdfbe0f7850db0100188fdc Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 25 Oct 2022 14:45:41 -0700 Subject: [PATCH] Fix 410 gone response handling --- src/cargo/sources/registry/http_remote.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cargo/sources/registry/http_remote.rs b/src/cargo/sources/registry/http_remote.rs index c5ec79f22a7..e659cb3ccfe 100644 --- a/src/cargo/sources/registry/http_remote.rs +++ b/src/cargo/sources/registry/http_remote.rs @@ -235,7 +235,7 @@ impl<'cfg> HttpRegistry<'cfg> { result.with_context(|| format!("failed to download from `{}`", url))?; let code = handle.response_code()?; // Keep this list of expected status codes in sync with the codes handled in `load` - if !matches!(code, 200 | 304 | 401 | 404 | 451) { + if !matches!(code, 200 | 304 | 410 | 404 | 451) { let url = handle.effective_url()?.unwrap_or(&url); return Err(HttpNotSuccessful { code,