]> granicus.if.org Git - apache/commitdiff
TODO: changing directory should be handled by CreateProcess
authorRoy T. Fielding <fielding@apache.org>
Thu, 26 Aug 1999 17:26:45 +0000 (17:26 +0000)
committerRoy T. Fielding <fielding@apache.org>
Thu, 26 Aug 1999 17:26:45 +0000 (17:26 +0000)
Submitted by: Dean Gaudet

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83791 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_include.c

index e1281d10cad0624e38ff76eba17129983cc40c5c..b4fc4430081cb3fac465a34d4f506c33063fc374 100644 (file)
@@ -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);