|
|
| version 1.74, 2002/06/12 14:09:50 | version 1.78, 2002/08/01 11:41:21 |
|---|---|
| Line 3 | Line 3 |
| Copyright (c) 2000,2001, 2002 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2000,2001, 2002 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| $Id$ | |
| */ | */ |
| static const char* IDENT_PARSER3ISAPI_C="$Date$"; | |
| #ifndef _MSC_VER | #ifndef _MSC_VER |
| # error compile ISAPI module with MSVC [no urge for now to make it autoconf-ed (PAF)] | # error compile ISAPI module with MSVC [no urge for now to make it autoconf-ed (PAF)] |
| #endif | #endif |
| Line 30 | Line 30 |
| // consts | // consts |
| extern const char *main_RCSIds[]; | |
| #ifdef USE_SMTP | |
| extern const char *smtp_RCSIds[]; | |
| #endif | |
| extern const char *gd_RCSIds[]; | |
| extern const char *classes_RCSIds[]; | |
| extern const char *types_RCSIds[]; | |
| extern const char *parser3isapi_RCSIds[]; | |
| const char **RCSIds[]={ | |
| main_RCSIds, | |
| #ifdef USE_SMTP | |
| smtp_RCSIds, | |
| #endif | |
| gd_RCSIds, | |
| classes_RCSIds, | |
| types_RCSIds, | |
| parser3isapi_RCSIds, | |
| 0 | |
| }; | |
| const char *IIS51vars[]={ | const char *IIS51vars[]={ |
| "APPL_MD_PATH", "APPL_PHYSICAL_PATH", | "APPL_MD_PATH", "APPL_PHYSICAL_PATH", |
| "AUTH_PASSWORD", "AUTH_TYPE", "AUTH_USER", | "AUTH_PASSWORD", "AUTH_TYPE", "AUTH_USER", |
| Line 376 void real_parser_handler(Pool& pool, LPE | Line 356 void real_parser_handler(Pool& pool, LPE |
| request_info.content_type=lpECB->lpszContentType; | request_info.content_type=lpECB->lpszContentType; |
| request_info.content_length=lpECB->cbTotalBytes; | request_info.content_length=lpECB->cbTotalBytes; |
| request_info.cookie=SAPI::get_env(pool, "HTTP_COOKIE"); | request_info.cookie=SAPI::get_env(pool, "HTTP_COOKIE"); |
| request_info.mail_received=false; | |
| // prepare to process request | // prepare to process request |
| Request request(pool, | Request request(pool, |
| Line 390 void real_parser_handler(Pool& pool, LPE | Line 370 void real_parser_handler(Pool& pool, LPE |
| /* status_allowed */); | /* status_allowed */); |
| // beside by binary | // beside by binary |
| static char site_config_path[MAX_STRING]; | static char beside_binary_path[MAX_STRING]; |
| strncpy(site_config_path, argv0, MAX_STRING-1); site_config_path[MAX_STRING-1]=0; // filespec of my binary | strncpy(beside_binary_path, argv0, MAX_STRING-1); beside_binary_path[MAX_STRING-1]=0; // filespec of my binary |
| if(!( | if(!( |
| rsplit(site_config_path, '/') || | rsplit(beside_binary_path, '/') || |
| rsplit(site_config_path, '\\'))) { // strip filename | rsplit(beside_binary_path, '\\'))) { // strip filename |
| // no path, just filename | // no path, just filename |
| site_config_path[0]='.'; site_config_path[1]=0; | beside_binary_path[0]='.'; beside_binary_path[1]=0; |
| } | } |
| char config_filespec[MAX_STRING]; | char config_filespec[MAX_STRING]; |
| snprintf(config_filespec, MAX_STRING, | snprintf(config_filespec, MAX_STRING, |
| "%s/%s", | "%s/%s", |
| site_config_path, CONFIG_FILE_NAME); | beside_binary_path, AUTO_FILE_NAME); |
| // process the request | // process the request |
| request.core( | request.core( |
| config_filespec, false /*fail_on_read_problem*/, // /path/to/parser3.conf | config_filespec, false /*fail_on_read_problem*/, // /path/to/first/auto.p |
| header_only); | header_only); |
| } | } |