--- parser3/src/targets/isapi/parser3isapi.C 2001/04/19 15:38:03 1.30 +++ parser3/src/targets/isapi/parser3isapi.C 2001/08/28 10:30:29 1.36 @@ -4,9 +4,8 @@ Copyright (c) 2000,2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: parser3isapi.C,v 1.30 2001/04/19 15:38:03 paf Exp $ */ +static const char *RCSId="$Id: parser3isapi.C,v 1.36 2001/08/28 10:30:29 parser Exp $"; #ifndef _MSC_VER # error compile ISAPI module with MSVC [no urge for now to make it autoconf-ed (PAF)] @@ -181,6 +180,8 @@ static bool parser_init() { // init socks init_socks(pool); + // init global classes + init_methoded_array(pool); // init global variables pa_globals_init(pool); @@ -198,7 +199,8 @@ static bool parser_init() { /// ISAPI // BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO *pVer) { pVer->dwExtensionVersion = HSE_VERSION; - strncpy(pVer->lpszExtensionDesc, "Parser "PARSER_VERSION, HSE_MAX_EXT_DLL_NAME_LEN); + strncpy(pVer->lpszExtensionDesc, "Parser "PARSER_VERSION, HSE_MAX_EXT_DLL_NAME_LEN-1); + pVer->lpszExtensionDesc[HSE_MAX_EXT_DLL_NAME_LEN-1]=0; return parser_init(); } @@ -239,8 +241,7 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSI // IIS size_t len=strlen(filespec_to_process)-strlen(path_info); char *buf=(char *)pool.malloc(len+1); - strncpy(buf, filespec_to_process, len); - buf[len]=0; + strncpy(buf, filespec_to_process, len); buf[len]=0; request_info.document_root=buf; } else PTHROW(0, 0, @@ -270,7 +271,7 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSI // prepare to process request Request request(pool, request_info, - String::UL_HTML_TYPO + String::UL_USER_HTML ); // some root-controlled location @@ -289,7 +290,7 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSI } PCATCH(e) { // global problem // don't allocate anything on pool here: // possible pool' exception not catch-ed now - // and there could be out-of-memory exception + // and there could be out-of-memory exception const char *body=e.comment(); // log it SAPI::log(pool, "exception in request exception handler: %s", body);