diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-02-06 15:04:47 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-02-06 15:04:47 +0100 |
commit | a577a938d4b957b5462a830b21d509fa754b33d5 (patch) | |
tree | fd3ab848593a0818ae5be30508b6a469557d9a1a /methods/http.cc | |
parent | 78a9df8a467d9f240df81c236f233a38f450e60a (diff) | |
parent | 39e1be0ff93e3084b7cb98b6a7d0c272a8b296b0 (diff) |
* merged the apt--mirror branch
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/methods/http.cc b/methods/http.cc index 0eef7a633..ecfb80bd2 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -38,7 +38,6 @@ #include <stdio.h> #include <errno.h> #include <string.h> -#include <iostream> #include <apti18n.h> // Internet stuff @@ -58,7 +57,7 @@ time_t HttpMethod::FailTime = 0; unsigned long PipelineDepth = 10; unsigned long TimeOut = 120; bool Debug = false; - +URI Proxy; unsigned long CircleBuf::BwReadLimit=0; unsigned long CircleBuf::BwTickReadData=0; @@ -916,6 +915,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; @@ -991,7 +993,7 @@ void HttpMethod::SigTerm(int) depth. */ bool HttpMethod::Fetch(FetchItem *) { - if (Server == 0) + if (Server == 0) return true; // Queue the requests @@ -1224,13 +1226,5 @@ int HttpMethod::Loop() } /*}}}*/ -int main() -{ - setlocale(LC_ALL, ""); - - HttpMethod Mth; - - return Mth.Loop(); -} |