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 d43dd14c8..3e2227f2b 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(); -} - |