diff options
author | Bradley Nicholes <bnicholes@apache.org> | 2002-07-25 21:06:13 +0200 |
---|---|---|
committer | Bradley Nicholes <bnicholes@apache.org> | 2002-07-25 21:06:13 +0200 |
commit | 5e52ad101d40877a0531075393c334894b8a4749 (patch) | |
tree | abcb0ed247444ca081e39ff26ff4c4b331ee57a7 /modules/arch/netware | |
parent | Corrected invalid link. (diff) | |
download | apache2-5e52ad101d40877a0531075393c334894b8a4749.tar.xz apache2-5e52ad101d40877a0531075393c334894b8a4749.zip |
Fixed the ap_cgi_build_command() function for NetWare so that it correctly
builds both the CGI and SSI command strings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96190 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/arch/netware')
-rw-r--r-- | modules/arch/netware/mod_netware.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/arch/netware/mod_netware.c b/modules/arch/netware/mod_netware.c index acb1ee05ff..4d9007c852 100644 --- a/modules/arch/netware/mod_netware.c +++ b/modules/arch/netware/mod_netware.c @@ -125,7 +125,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, request_rec *r, apr_pool_t *p, cgi_exec_info_t *e_info) { - const char *ext = NULL; + char *ext = NULL; + char *cmd_only, *ptr; const char *detached = NULL; netware_dir_config *d; apr_file_t *fh; @@ -147,7 +148,13 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, args = r->args; } } - ext = strrchr(apr_filename_of_pathname(*cmd), '.'); + cmd_only = apr_pstrdup(p, *cmd); + + /* truncate any arguments from the cmd */ + for (ptr = cmd_only; *ptr && (*ptr != ' '); ptr++); + *ptr = '\0'; + + ext = strrchr(apr_filename_of_pathname(cmd_only), '.'); if (*ext == '.') ++ext; @@ -166,8 +173,9 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, } } - apr_tokenize_to_argv(r->filename, (char***)argv, p); + apr_tokenize_to_argv(*cmd, (char***)argv, p); e_info->cmd_type = APR_PROGRAM; + *cmd = ap_server_root_relative(p, cmd_only); return APR_SUCCESS; } |