1
/* Licensed to the Apache Software Foundation (ASF) under one or more
2
* contributor license agreements. See the NOTICE file distributed with
3
* this work for additional information regarding copyright ownership.
4
* The ASF licenses this file to You under the Apache License, Version 2.0
5
* (the "License"); you may not use this file except in compliance with
6
* the License. You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
19
* @brief CGI Script Execution Extension Module for Apache
21
* @defgroup MOD_CGI mod_cgi
22
* @ingroup APACHE_MODS
29
#include "mod_include.h"
31
typedef enum {RUN_AS_SSI, RUN_AS_CGI} prog_types;
38
apr_cmdtype_e cmd_type;
41
apr_bucket_brigade **bb;
44
apr_int32_t addrspace;
48
* Registerable optional function to override CGI behavior;
49
* Reprocess the command and arguments to execute the given CGI script.
50
* @param cmd Pointer to the command to execute (may be overridden)
51
* @param argv Pointer to the arguments to pass (may be overridden)
52
* @param r The current request
53
* @param p The pool to allocate correct cmd/argv elements within.
54
* @param process_cgi Set true if processing r->filename and r->args
55
* as a CGI invocation, otherwise false
56
* @param type Set to APR_SHELLCMD or APR_PROGRAM on entry, may be
57
* changed to invoke the program with alternate semantics.
58
* @param detach Should the child start in detached state? Default is no.
59
* @remark This callback may be registered by the os-specific module
60
* to correct the command and arguments for apr_proc_create invocation
61
* on a given os. mod_cgi will call the function if registered.
63
APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_cgi_build_command,
64
(const char **cmd, const char ***argv,
65
request_rec *r, apr_pool_t *p,
66
cgi_exec_info_t *e_info));
68
#endif /* _MOD_CGI_H */