1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

process_cgi is more descriptive than replace_cmd.

It also affects query_string args.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94638 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
William A. Rowe Jr
2002-04-13 20:42:35 +00:00
parent c182bbe3b2
commit e97e2e539c
2 changed files with 13 additions and 7 deletions

View File

@@ -510,13 +510,13 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
static apr_status_t default_build_command(const char **cmd, const char ***argv,
request_rec *r, apr_pool_t *p,
int replace_cmd, apr_cmdtype_e * type)
int process_cgi, apr_cmdtype_e * type)
{
int numwords, x, idx;
char *w;
const char *args = r->args;
const char *args = NULL;
if (replace_cmd) {
if (process_cgi) {
/* Allow suexec's "/" check to succeed */
const char *argv0 = strrchr(r->filename, '/');
if (argv0 != NULL)
@@ -524,9 +524,15 @@ static apr_status_t default_build_command(const char **cmd, const char ***argv,
else
argv0 = r->filename;
*cmd = argv0;
args = r->args;
/* Do not process r->args if they contain an '=' assignment
*/
if (r->args && r->args[0] && !ap_strchr_c(r->args, '=')) {
args = r->args;
}
}
if (!args || !args[0] || ap_strchr_c(args, '=')) {
if (!args) {
numwords = 1;
}
else {