diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-02-05 17:52:28 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-02-05 17:52:28 +0100 |
commit | 59271f62e4a291c8d96e1f6073203c395734b6ca (patch) | |
tree | 114963f118d57bafc02b273dfdb1d4b972527c9a /methods/http.cc | |
parent | 361593e92a44255cc0ef98417e7457911716cab5 (diff) |
* use pkgAcqMethod::FailReason() for consistent error reporting
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/methods/http.cc b/methods/http.cc index deaa8d0c8..01ad14655 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -914,6 +914,9 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) failure */ if (Srv->Result < 200 || Srv->Result >= 300) { + char err[255]; + snprintf(err,sizeof(err)-1,"HttpError%i",Srv->Result); + SetFailReason(err); _error->Error("%u %s",Srv->Result,Srv->Code); if (Srv->HaveContent == true) return 4; |