From 2424edbc320841311d80561dc394377c74987dfb Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Wed, 27 Dec 2000 23:30:07 +0000 Subject: [PATCH] On Unix, we do not want to use an absolute path for CGI scripts. SuEXEC will not let us use one, and when not using SuEXEC, we chdir() into the correct directory. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87537 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_cgi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index b161ff61d59..7ca07259e5f 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -492,7 +492,7 @@ static apr_status_t build_command_line(const char **cmd, request_rec *r, *cmd = apr_pstrcat(p, quoted_filename, NULL); } #else - *cmd = apr_pstrcat(p, r->filename, NULL); + *cmd = argv0; #endif return APR_SUCCESS; } @@ -579,15 +579,15 @@ static int cgi_handler(request_rec *r) /* build the command line */ if (build_command_line(&command, r, p) != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, - "couldn't spawn child process: %s", r->filename); - return HTTP_INTERNAL_SERVER_ERROR; + ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, + "couldn't spawn child process: %s", r->filename); + return HTTP_INTERNAL_SERVER_ERROR; } /* build the argument list */ else if (build_argv_list(&argv, r, p) != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, - "couldn't spawn child process: %s", r->filename); - return HTTP_INTERNAL_SERVER_ERROR; + ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, + "couldn't spawn child process: %s", r->filename); + return HTTP_INTERNAL_SERVER_ERROR; } argv[0] = apr_pstrdup(p, command); -- 2.47.3