mod_netware.c revision 36ef8f77bffe75d1aa327882be1b5bdbe2ff567a
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "apr_strings.h"
#include "apr_portable.h"
#include "apr_buckets.h"
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_protocol.h"
#include "http_request.h"
#include "http_log.h"
#include "util_script.h"
#include "mod_core.h"
#include "apr_optional.h"
#include "apr_lib.h"
#include "mod_cgi.h"
#ifdef NETWARE
typedef struct {
{
return new;
}
{
return new;
}
{
int i, len;
if (*ext == '.')
++ext;
for (i=0; i<len; i++) {
if (CGIhdlr[i] == '\\') {
CGIhdlr[i] = '/';
}
}
}
if (detach) {
}
return NULL;
}
request_rec *r, apr_pool_t *p,
{
const char *new_cmd;
apr_file_t *fh;
const char *args = "";
if (e_info->process_cgi) {
/* Handle the complete file name, we DON'T want to follow suexec, since
* an unrooted command is as predictable as shooting craps in Win32.
*
* Notice that unlike most mime extension parsing, we have to use the
* win32 parsing here, therefore the final extension is the only one
* we will consider
*/
}
}
/* truncate any arguments from the cmd */
*ptr = '\0';
/* Figure out what the extension is so that we can matche it. */
/* 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*/
"Could not find a command associated with the %s extension", ext);
return APR_EBADF;
}
/* If we have a registered command then add the file that was passed in as a
parameter to the registered command. */
/* Run in its own address space if specified */
}
/* Tokenize the full command string into its arguments */
/* The first argument should be the executible */
return APR_SUCCESS;
}
static int
{
return OK;
}
static void register_hooks(apr_pool_t *p)
{
}
static const command_rec netware_cmds[] = {
"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 }
};
AP_DECLARE_MODULE(netware) = {
create_netware_dir_config, /* create per-dir config */
merge_netware_dir_configs, /* merge per-dir config */
NULL, /* server config */
NULL, /* merge server config */
netware_cmds, /* command apr_table_t */
register_hooks /* register hooks */
};
#endif