diff options
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 14 |
1 files changed, 3 insertions, 11 deletions
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(); -} - |