On HTTP errors, also show the curl error

This is a hopefully temporary measure to diagnose the intermittent
"HTTP error 200" failures.
This commit is contained in:
Eelco Dolstra 2017-01-24 20:13:19 +01:00
parent 4425a5c547
commit e8c43abd9a
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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