From e8c43abd9aed4d88f2cce9ebc97de73930dffdfb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Jan 2017 20:13:19 +0100 Subject: [PATCH] On HTTP errors, also show the curl error This is a hopefully temporary measure to diagnose the intermittent "HTTP error 200" failures. --- 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 8030e83b0..074e0ca66 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -276,7 +276,7 @@ struct CurlDownloader : public Downloader code == CURLE_ABORTED_BY_CALLBACK && _isInterrupted ? DownloadError(Interrupted, format("download of ‘%s’ was interrupted") % request.uri) : httpStatus != 0 - ? DownloadError(err, format("unable to download ‘%s’: HTTP error %d") % request.uri % httpStatus) + ? DownloadError(err, format("unable to download ‘%s’: HTTP error %d (curl error: %s)") % request.uri % httpStatus % curl_easy_strerror(code)) : DownloadError(err, format("unable to download ‘%s’: %s (%d)") % request.uri % curl_easy_strerror(code) % code); /* If this is a transient error, then maybe retry the