1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 22:42:41 +01:00

Handle HTTP 410 Gone errors

(cherry picked from commit 691b7582c7)
This commit is contained in:
Eelco Dolstra 2018-06-05 16:03:32 +02:00
parent 811645ed01
commit e2ac8756ae
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -311,7 +311,7 @@ struct CurlDownloader : public Downloader
// We treat most errors as transient, but won't retry when hopeless // We treat most errors as transient, but won't retry when hopeless
Error err = Transient; 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 // The file is definitely not there
err = NotFound; err = NotFound;
} else if (httpStatus == 401 || httpStatus == 403 || httpStatus == 407) { } else if (httpStatus == 401 || httpStatus == 403 || httpStatus == 407) {