mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Simplify add_ssi_vars() and move the ssi/cgi vars into their respective
functions [so we may address r->subprocess_env in the ap_cgi_build_command win32 handler.] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95853 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -350,7 +350,7 @@ static int log_script(request_rec *r, cgi_server_conf * conf, int ret,
|
|||||||
/* This is the special environment used for running the "exec cmd="
|
/* This is the special environment used for running the "exec cmd="
|
||||||
* variety of SSI directives.
|
* variety of SSI directives.
|
||||||
*/
|
*/
|
||||||
static void add_ssi_vars(request_rec *r, ap_filter_t *next)
|
static void add_ssi_vars(request_rec *r)
|
||||||
{
|
{
|
||||||
apr_table_t *e = r->subprocess_env;
|
apr_table_t *e = r->subprocess_env;
|
||||||
|
|
||||||
@@ -401,7 +401,6 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
|
|||||||
&core_module);
|
&core_module);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_CGI
|
#ifdef DEBUG_CGI
|
||||||
#ifdef OS2
|
#ifdef OS2
|
||||||
/* Under OS/2 need to use device con. */
|
/* Under OS/2 need to use device con. */
|
||||||
@@ -418,13 +417,6 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
|
|||||||
r->filename, argv[0]);
|
r->filename, argv[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (e_info->prog_type == RUN_AS_CGI) {
|
|
||||||
ap_add_cgi_vars(r);
|
|
||||||
}
|
|
||||||
else /* SSIs want a controlled environment and a special path. */
|
|
||||||
{
|
|
||||||
add_ssi_vars(r, e_info->next);
|
|
||||||
}
|
|
||||||
env = (const char * const *)ap_create_environment(p, r->subprocess_env);
|
env = (const char * const *)ap_create_environment(p, r->subprocess_env);
|
||||||
|
|
||||||
#ifdef DEBUG_CGI
|
#ifdef DEBUG_CGI
|
||||||
@@ -648,6 +640,7 @@ static int cgi_handler(request_rec *r)
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
ap_add_common_vars(r);
|
ap_add_common_vars(r);
|
||||||
|
ap_add_cgi_vars(r);
|
||||||
|
|
||||||
e_info.process_cgi = 1;
|
e_info.process_cgi = 1;
|
||||||
e_info.cmd_type = APR_PROGRAM;
|
e_info.cmd_type = APR_PROGRAM;
|
||||||
@@ -923,6 +916,8 @@ static int include_cmd(include_ctx_t *ctx, apr_bucket_brigade **bb,
|
|||||||
apr_bucket *b;
|
apr_bucket *b;
|
||||||
apr_status_t rv;
|
apr_status_t rv;
|
||||||
|
|
||||||
|
add_ssi_vars(r);
|
||||||
|
|
||||||
e_info.process_cgi = 0;
|
e_info.process_cgi = 0;
|
||||||
e_info.cmd_type = APR_SHELLCMD;
|
e_info.cmd_type = APR_SHELLCMD;
|
||||||
e_info.detached = 0;
|
e_info.detached = 0;
|
||||||
|
Reference in New Issue
Block a user