mod_cgi.h revision 5cbcfb67829b89d261f9a1f16350212b1c776411
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder/* Copyright 2001-2004 The Apache Software Foundation
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * Licensed under the Apache License, Version 2.0 (the "License");
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * you may not use this file except in compliance with the License.
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * You may obtain a copy of the License at
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * http://www.apache.org/licenses/LICENSE-2.0
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * Unless required by applicable law or agreed to in writing, software
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * distributed under the License is distributed on an "AS IS" BASIS,
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * See the License for the specific language governing permissions and
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * limitations under the License.
329c739bc05b8ce8d54f81071d0826ff771d1f78Christian Maedertypedef enum {RUN_AS_SSI, RUN_AS_CGI} prog_types;
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maedertypedef struct {
ac4396c9f44a76c5c97925954ee49b4a91d8dd88Christian Maeder * Registerable optional function to override CGI behavior;
ac4396c9f44a76c5c97925954ee49b4a91d8dd88Christian Maeder * Reprocess the command and arguments to execute the given CGI script.
ac4396c9f44a76c5c97925954ee49b4a91d8dd88Christian Maeder * @param cmd Pointer to the command to execute (may be overridden)
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * @param argv Pointer to the arguments to pass (may be overridden)
c04cc42aa672aa49b45005e6eed77cc80e0d6ae0Christian Maeder * @param r The current request
c04cc42aa672aa49b45005e6eed77cc80e0d6ae0Christian Maeder * @param p The pool to allocate correct cmd/argv elements within.
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * @param process_cgi Set true if processing r->filename and r->args
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * as a CGI invocation, otherwise false
a38f3d84e592184830fa308c5dab3f7c71e4464fChristian Maeder * @param type Set to APR_SHELLCMD or APR_PROGRAM on entry, may be
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * changed to invoke the program with alternate semantics.
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * @param detach Should the child start in detached state? Default is no.
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * @remark This callback may be registered by the os-specific module
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder * to correct the command and arguments for apr_proc_create invocation
329c739bc05b8ce8d54f81071d0826ff771d1f78Christian Maeder * on a given os. mod_cgi will call the function if registered.
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian MaederAPR_DECLARE_OPTIONAL_FN(apr_status_t, ap_cgi_build_command,
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder#endif /* _MOD_CGI_H */