--- parser3/src/targets/isapi/parser3isapi.C 2001/10/22 16:44:43 1.55 +++ parser3/src/targets/isapi/parser3isapi.C 2001/11/19 12:17:07 1.60 @@ -2,9 +2,9 @@ Parser: IIS extension. Copyright (c) 2000,2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + Author: Alexander Petrosyan (http://paf.design.ru) - $Id: parser3isapi.C,v 1.55 2001/10/22 16:44:43 parser Exp $ + $Id: parser3isapi.C,v 1.60 2001/11/19 12:17:07 paf Exp $ */ #ifndef _MSC_VER @@ -15,6 +15,7 @@ #include #include +#include #include @@ -109,7 +110,7 @@ void SAPI::log(Pool& pool, const char *f } /// @todo event log -void SAPI::die(Pool& pool, const char *fmt, ...) { +void SAPI::die(const char *fmt, ...) { exit(1); } @@ -229,12 +230,19 @@ void SAPI::send_body(Pool& pool, const v // +int failed_new(size_t size) { + SAPI::die("out of memory in 'new', failed to allocated %u bytes", size); + return 0; // not reached +} + static bool parser_init() { static bool globals_inited=false; if(globals_inited) return true; globals_inited=true; + _set_new_handler(failed_new); + static Pool pool(0); // global pool try { // init socks @@ -334,8 +342,8 @@ void real_parser_handler(Pool& pool, LPE // prepare to process request Request request(pool, request_info, - String::UL_USER_HTML - ); + String::UL_HTML|String::UL_OPTIMIZE_BIT, + false /* status_allowed */); // some root-controlled location // c:\windows