home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / apache_2.2.8-win32-x86-no_ssl.msi / Data1.cab / _2710B4C0D132C27A7C98D19FAEF0A052 < prev    next >
Text File  |  2006-07-11  |  3KB  |  71 lines

  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
  7.  *
  8.  *     http://www.apache.org/licenses/LICENSE-2.0
  9.  *
  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.
  15.  */
  16.  
  17. /**
  18.  * @file  mod_cgi.h
  19.  * @brief CGI Script Execution Extension Module for Apache
  20.  * 
  21.  * @defgroup MOD_CGI mod_cgi
  22.  * @ingroup APACHE_MODS
  23.  * @{
  24.  */
  25.  
  26. #ifndef _MOD_CGI_H
  27. #define _MOD_CGI_H 1
  28.  
  29. #include "mod_include.h"
  30.  
  31. typedef enum {RUN_AS_SSI, RUN_AS_CGI} prog_types;
  32.  
  33. typedef struct {
  34.     apr_int32_t          in_pipe;
  35.     apr_int32_t          out_pipe;
  36.     apr_int32_t          err_pipe;
  37.     int                  process_cgi;
  38.     apr_cmdtype_e        cmd_type;
  39.     apr_int32_t          detached;
  40.     prog_types           prog_type;
  41.     apr_bucket_brigade **bb;
  42.     include_ctx_t       *ctx;
  43.     ap_filter_t         *next;
  44.     apr_int32_t          addrspace;
  45. } cgi_exec_info_t;
  46.  
  47. /**
  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.
  62.  */
  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));
  67.  
  68. #endif /* _MOD_CGI_H */
  69. /** @} */
  70.  
  71.