You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2002/06/10 18:22:36 UTC
cvs commit: httpd-2.0/modules/arch/netware mod_netware.c
bnicholes 2002/06/10 09:22:36
Modified: modules/arch/netware mod_netware.c
Log:
Modified the CGIMapExtension directive to take an optional parameter that
specifies how the CGI NLM should be launched.
Revision Changes Path
1.3 +17 -5 httpd-2.0/modules/arch/netware/mod_netware.c
Index: mod_netware.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/arch/netware/mod_netware.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mod_netware.c 5 Jun 2002 22:58:03 -0000 1.2
+++ mod_netware.c 10 Jun 2002 16:22:36 -0000 1.3
@@ -80,6 +80,7 @@
typedef struct {
apr_table_t *file_type_handlers; /* CGI map from file types to CGI modules */
+ apr_table_t *file_handler_mode; /* CGI module mode (spawn in same address space or not) */
apr_table_t *extra_env_vars; /* Environment variables to be added to the CGI environment */
} netware_dir_config;
@@ -89,6 +90,7 @@
netware_dir_config *new = (netware_dir_config*) apr_palloc(p, sizeof(netware_dir_config));
new->file_type_handlers = apr_table_make(p, 10);
+ new->file_handler_mode = apr_table_make(p, 10);
new->extra_env_vars = apr_table_make(p, 10);
return new;
@@ -101,16 +103,21 @@
netware_dir_config *new = (netware_dir_config *) apr_palloc(p, sizeof(netware_dir_config));
new->file_type_handlers = apr_table_overlay(p, add->file_type_handlers, base->file_type_handlers);
+ new->file_handler_mode = apr_table_overlay(p, add->file_handler_mode, base->file_handler_mode);
new->extra_env_vars = apr_table_overlay(p, add->extra_env_vars, base->extra_env_vars);
return new;
}
-static const char *set_extension_map(cmd_parms *cmd, netware_dir_config *m, char *CGIhdlr, char *ext)
+static const char *set_extension_map(cmd_parms *cmd, netware_dir_config *m,
+ char *CGIhdlr, char *ext, char *detach)
{
if (*ext == '.')
++ext;
apr_table_set(m->file_type_handlers, ext, CGIhdlr);
+ if (detach) {
+ apr_table_set(m->file_handler_mode, ext, "y");
+ }
return NULL;
}
@@ -119,7 +126,7 @@
cgi_exec_info_t *e_info)
{
const char *ext = NULL;
- const char *interpreter = NULL;
+ const char *detached = NULL;
netware_dir_config *d;
apr_file_t *fh;
const char *args = "";
@@ -153,7 +160,10 @@
"Could not find a command associated with the %s extension", ext);
return APR_EBADF;
}
-
+ detached = apr_table_get(d->file_handler_mode, ext);
+ if (detached) {
+ e_info->detached = 1;
+ }
}
apr_tokenize_to_argv(r->filename, (char***)argv, p);
@@ -168,8 +178,10 @@
}
static const command_rec netware_cmds[] = {
-AP_INIT_ITERATE2("CGIMapExtension", set_extension_map, NULL, OR_FILEINFO,
- "full path to the CGI NLM module followed by one or more file extensions"),
+AP_INIT_TAKE23("CGIMapExtension", set_extension_map, NULL, OR_FILEINFO,
+ "Full path to the CGI NLM module followed by a file extension. "
+ "The optional parameter \"detach\" can be specified if the NLM should "
+ "be launched in its own address space."),
{ NULL }
};