From e2ac8756ae29ed6d53b1b650db813680b234bddb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Jun 2018 16:03:32 +0200 Subject: [PATCH] Handle HTTP 410 Gone errors (cherry picked from commit 691b7582c76e05774548e84aba92ff0eb19b2589) --- src/libstore/download.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 82abd43d9..9a499a594 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -311,7 +311,7 @@ struct CurlDownloader : public Downloader // We treat most errors as transient, but won't retry when hopeless Error err = Transient; - if (httpStatus == 404 || code == CURLE_FILE_COULDNT_READ_FILE) { + if (httpStatus == 404 || httpStatus == 410 || code == CURLE_FILE_COULDNT_READ_FILE) { // The file is definitely not there err = NotFound; } else if (httpStatus == 401 || httpStatus == 403 || httpStatus == 407) {