X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/96cc64a521957d63704de72ed95f1c839698c53c..ea6db08d45e012d577f3081fa2070db9e034add9:/methods/http.cc?ds=sidebyside diff --git a/methods/http.cc b/methods/http.cc index 5fdc62696..9fa74bffa 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -953,6 +953,9 @@ 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 ERROR_WITH_CONTENT_PAGE; @@ -1366,15 +1369,4 @@ bool HttpMethod::AutoDetectProxy() } /*}}}*/ -int main() -{ - setlocale(LC_ALL, ""); - // ignore SIGPIPE, this can happen on write() if the socket - // closes the connection (this is dealt with via ServerDie()) - signal(SIGPIPE, SIG_IGN); - - HttpMethod Mth; - return Mth.Loop(); -} -