--- parser3/src/targets/apache13/Attic/mod_parser3.C 2002/06/11 12:20:42 1.21 +++ parser3/src/targets/apache13/Attic/mod_parser3.C 2002/08/01 11:26:52 1.25 @@ -3,10 +3,10 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - - $Id: mod_parser3.C,v 1.21 2002/06/11 12:20:42 paf Exp $ */ +static const char* IDENT_MOD_PARSER3_C="$Id: mod_parser3.C,v 1.25 2002/08/01 11:26:52 paf Exp $"; + #include "pa_config_includes.h" #if _MSC_VER @@ -30,34 +30,9 @@ #include "pa_version.h" #include "pa_socks.h" - -// 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 *ApacheModuleParser3_RCSIds[]; -const char **RCSIds[]={ - main_RCSIds, -#ifdef USE_SMTP - smtp_RCSIds, -#endif - gd_RCSIds, - classes_RCSIds, - types_RCSIds, - ApacheModuleParser3_RCSIds, - 0 -}; - - /// apache parser module configuration [httpd.conf + .htaccess-es] struct Parser_module_config { - const char* parser_root_config_filespec; ///< filespec of admin's config file - const char* parser_site_config_filespec; ///< filespec of site's config file + const char* parser_config_filespec; ///< filespec of site's config file bool parser_status_allowed; }; @@ -79,7 +54,7 @@ static const char *cmd_parser_config(cmd Parser_module_config *cfg = (Parser_module_config *) mconfig; // remember assigned filespec into cfg - (cmd->info?cfg->parser_root_config_filespec:cfg->parser_site_config_filespec)=file_spec; + cfg->parser_config_filespec=file_spec; return NULL; } @@ -264,6 +239,7 @@ static void real_parser_handler(Pool& po const char *content_length=SAPI::get_env(pool, "CONTENT_LENGTH"); request_info.content_length=content_length?atoi(content_length):0; request_info.cookie=SAPI::get_env(pool, "HTTP_COOKIE"); + request_info.mail_received=false; // config Parser_module_config *dcfg=our_dconfig(r); @@ -278,8 +254,7 @@ static void real_parser_handler(Pool& po // process the request request.core( - dcfg->parser_root_config_filespec, true, // /path/to/admin/config - dcfg->parser_site_config_filespec, true, // /path/to/site/config + dcfg->parser_config_filespec, true, // /path/to/config r->header_only!=0); } @@ -506,10 +481,8 @@ static void *parser_merge_dir_config(poo Parser_module_config *pconf = (Parser_module_config *) parent_conf; Parser_module_config *nconf = (Parser_module_config *) newloc_conf; - merged_config->parser_root_config_filespec = ap_pstrdup(p, nconf->parser_root_config_filespec? - nconf->parser_root_config_filespec:pconf->parser_root_config_filespec); - merged_config->parser_site_config_filespec = ap_pstrdup(p, nconf->parser_site_config_filespec? - nconf->parser_site_config_filespec:pconf->parser_site_config_filespec); + merged_config->parser_config_filespec = ap_pstrdup(p, nconf->parser_config_filespec? + nconf->parser_config_filespec:pconf->parser_config_filespec); merged_config->parser_status_allowed= pconf->parser_status_allowed || nconf->parser_status_allowed; @@ -568,10 +541,8 @@ static void *parser_merge_server_config( * Our inheritance rules are our own, and part of our module's semantics. * Basically, just note whence we came. */ - merged_config->parser_root_config_filespec = ap_pstrdup(p, s2conf->parser_root_config_filespec? - s2conf->parser_root_config_filespec:s1conf->parser_root_config_filespec); - merged_config->parser_site_config_filespec = ap_pstrdup(p, s2conf->parser_site_config_filespec? - s2conf->parser_site_config_filespec:s1conf->parser_site_config_filespec); + merged_config->parser_config_filespec = ap_pstrdup(p, s2conf->parser_config_filespec? + s2conf->parser_config_filespec:s1conf->parser_config_filespec); merged_config->parser_status_allowed= s1conf->parser_status_allowed || s2conf->parser_status_allowed; @@ -651,20 +622,12 @@ static int parser_access_checker(request static const command_rec parser_cmds[] = { { - "ParserRootConfig", /* directive name */ - (const char *(*)(void))((void *)cmd_parser_config), // config action routine - (void*)true, /* argument to include in call */ - (int)(ACCESS_CONF|RSRC_CONF), /* where available */ - TAKE1, /* arguments */ - "Parser root config filespec (Admin)" // directive description - }, - { - "ParserSiteConfig", /* directive name */ + "ParserConfig", /* directive name */ (const char *(*)(void))((void *)cmd_parser_config), // config action routine - (void*)false, /* argument to include in call */ + (void*)0, /* argument to include in call */ (int)(OR_OPTIONS), /* where available */ TAKE1, /* arguments */ - "Parser site config filespec" // directive description + "Parser config filespec" // directive description }, { "ParserStatusAllowed", /* directive name */