summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-method.cc17
-rw-r--r--methods/https.cc8
2 files changed, 21 insertions, 4 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index a9fff661b..39d5e61f2 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -80,9 +80,20 @@ void pkgAcqMethod::Fail(bool Transient)
{
string Err = "Undetermined Error";
if (_error->empty() == false)
- _error->PopMessage(Err);
- _error->Discard();
- Fail(Err,Transient);
+ {
+ Err.clear();
+ while (_error->empty() == false)
+ {
+ std::string msg;
+ if (_error->PopMessage(msg))
+ {
+ if (Err.empty() == false)
+ Err.append("\n");
+ Err.append(msg);
+ }
+ }
+ }
+ Fail(Err, Transient);
}
/*}}}*/
// AcqMethod::Fail - A fetch has failed /*{{{*/
diff --git a/methods/https.cc b/methods/https.cc
index 92f786d17..bbdbd8fa9 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -436,7 +436,13 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
break;
}
#pragma GCC diagnostic pop
- return _error->Error("%s", curl_errorstr);
+ // only take curls technical errors if we haven't our own
+ // (e.g. for the maximum size limit we have and curls can be confusing)
+ if (_error->PendingError() == false)
+ _error->Error("%s", curl_errorstr);
+ else
+ _error->Warning("curl: %s", curl_errorstr);
+ return false;
}
// server says file not modified