/* Licensed to the Apache Software Foundation (ASF) under one or more *contributorlicenseagreements.SeetheNOTICEfiledistributedwith *thisworkforadditionalinformationregardingcopyrightownership. *TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0 *(the"License");youmaynotusethisfileexceptincompliancewith *theLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
typedefstruct {
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;
/* truncate any arguments from the cmd */ for (ptr = cmd_only; *ptr && (*ptr != ' '); ptr++);
*ptr = '\0';
/* Figure out what the extension is so that we can match it. */
ext = strrchr(apr_filepath_name_get(cmd_only), '.');
/* If there isn't an extension then give it an empty string */ if (!ext) {
ext = "";
}
/* eliminate the '.' if there is one */ if (*ext == '.') {
++ext;
}
/* check if we have a registered command for the extension*/
new_cmd = apr_table_get(d->file_type_handlers, ext);
e_info->detached = 1; if (new_cmd == NULL) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02135) "Could not find a command associated with the %s extension", ext); return APR_EBADF;
} if (stricmp(new_cmd, "OS")) { /* If we have a registered command then add the file that was passed in as a
parameter to the registered command. */
*cmd = apr_pstrcat (p, new_cmd, " ", cmd_only, NULL);
/* Run in its own address space if specified */ if (apr_table_get(d->file_handler_mode, ext)) {
e_info->addrspace = 1;
}
}
/* Tokenize the full command string into its arguments */
apr_tokenize_to_argv(*cmd, (char***)argv, p);
/* The first argument should be the executible */
*cmd = ap_server_root_relative(p, *argv[0]);
staticconst command_rec netware_cmds[] = {
AP_INIT_TAKE23("CGIMapExtension", set_extension_map, NULL, OR_FILEINFO, "Full path to the CGI NLM module followed by a file extension. If the " "first parameter is set to \"OS\" then the following file extension is " "treated as NLM. The optional parameter \"detach\" can be specified if " "the NLM should be launched in its own address space."),
{ NULL }
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.