--- parser3/src/targets/isapi/parser3isapi.C 2001/04/19 11:57:05 1.29 +++ parser3/src/targets/isapi/parser3isapi.C 2001/06/28 07:44:17 1.35 @@ -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.29 2001/04/19 11:57:05 paf Exp $ */ +static const char *RCSId="$Id: parser3isapi.C,v 1.35 2001/06/28 07:44:17 parser Exp $"; #ifndef _MSC_VER # error compile ISAPI module with MSVC [no urge for now to make it autoconf-ed (PAF)] @@ -119,7 +118,7 @@ void SAPI::add_header_attribute(Pool& po ctx.header->APPEND_CONST(key); ctx.header->APPEND_CONST(": "); ctx.header->APPEND_CONST(value); - ctx.header->APPEND_CONST("\n"); + ctx.header->APPEND_CONST("\r\n"); } } @@ -128,8 +127,8 @@ void SAPI::send_header(Pool& pool) { SAPI_func_context& ctx=*static_cast(pool.context()); ctx.header->APPEND_CONST( - "expires: Fri, 23 Mar 2001 09:32:23 GMT\n" - "\n"); + "expires: Fri, 23 Mar 2001 09:32:23 GMT\r\n" + "\r\n"); HSE_SEND_HEADER_EX_INFO header_info; char status_buf[MAX_STATUS_LENGTH]; @@ -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); @@ -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); @@ -300,10 +301,10 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSI // prepare header // not using SAPI func wich allocates on pool char header_buf[MAX_STRING]; int header_len=snprintf(header_buf, MAX_STRING, - "content-type: text/plain\n" - "content-length: %lu\n" - "expires: Fri, 23 Mar 2001 09:32:23 GMT\n" - "\n", + "content-type: text/plain\r\n" + "content-length: %lu\r\n" + "expires: Fri, 23 Mar 2001 09:32:23 GMT\r\n" + "\r\n", content_length); HSE_SEND_HEADER_EX_INFO header_info;