From: Roy T. Fielding Date: Thu, 26 Aug 1999 17:26:45 +0000 (+0000) Subject: TODO: changing directory should be handled by CreateProcess X-Git-Tag: PRE_APR_CHANGES~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47303a8667820e867e8ad22219b801c637078f20;p=apache TODO: changing directory should be handled by CreateProcess Submitted by: Dean Gaudet git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83791 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index e1281d10ca..b4fc443008 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -111,6 +111,9 @@ module MODULE_VAR_EXPORT includes_module; /* just need some arbitrary non-NULL pointer which can't also be a request_rec */ #define NESTED_INCLUDE_MAGIC (&includes_module) +/* TODO: changing directory should be handled by CreateProcess */ +#define ap_chdir_file(x) do {} while(0) + /* ------------------------ Environment function -------------------------- */ /* XXX: could use ap_table_overlap here */ @@ -614,9 +617,7 @@ static int include_cgi(char *s, request_rec *r) } ap_destroy_sub_req(rr); -#ifndef WIN32 ap_chdir_file(r->filename); -#endif return 0; } @@ -736,9 +737,7 @@ static int handle_include(FILE *in, request_rec *r, const char *error, int noexe if (!error_fmt && ap_run_sub_req(rr)) { error_fmt = "unable to include \"%s\" in parsed file %s"; } -#ifndef WIN32 ap_chdir_file(r->filename); -#endif if (error_fmt) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, error_fmt, tag_val, r->filename); @@ -895,9 +894,7 @@ static int handle_exec(FILE *in, request_rec *r, const char *error) ap_rputs(error, r); } /* just in case some stooge changed directories */ -#ifndef WIN32 ap_chdir_file(r->filename); -#endif } else if (!strcmp(tag, "cgi")) { parse_string(r, tag_val, parsed_string, sizeof(parsed_string), 0); @@ -906,10 +903,7 @@ static int handle_exec(FILE *in, request_rec *r, const char *error) "invalid CGI ref \"%s\" in %s", tag_val, file); ap_rputs(error, r); } - /* grumble groan */ -#ifndef WIN32 ap_chdir_file(r->filename); -#endif } else if (!strcmp(tag, "done")) { return 0; @@ -2159,9 +2153,7 @@ static void send_parsed_content(FILE *f, request_rec *r) printing = conditional_status = 1; if_nesting = 0; -#ifndef WIN32 ap_chdir_file(r->filename); -#endif if (r->args) { /* add QUERY stuff to env cause it ain't yet */ char *arg_copy = ap_pstrdup(r->pool, r->args);