]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
* use pkgAcqMethod::FailReason() for consistent error reporting
[apt.git] / methods / http.cc
index deaa8d0c851050ed191e01533ded25fe68b1b4ab..01ad146557ff09905346c0c278e9f990e8a1839d 100644 (file)
@@ -914,6 +914,9 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv)
       failure */
    if (Srv->Result < 200 || Srv->Result >= 300)
    {
       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;
       _error->Error("%u %s",Srv->Result,Srv->Code);
       if (Srv->HaveContent == true)
         return 4;