]> granicus.if.org Git - apache/commitdiff
The code was truncating the parameters for all NLM level commands. Needed to make...
authorBradley Nicholes <bnicholes@apache.org>
Sat, 20 Mar 2004 04:17:26 +0000 (04:17 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Sat, 20 Mar 2004 04:17:26 +0000 (04:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103052 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/netware/mod_netware.c

index 14404577455c680dd03a20581b1d2f28e22fb73f..56f105a1092e7ffb2cd507db8b368a35dd72bf46 100644 (file)
@@ -98,6 +98,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
 {
     char *ext = NULL;
     char *cmd_only, *ptr;
+    const char *new_cmd;
     const char *detached = NULL;
     netware_dir_config *d;
     apr_file_t *fh;
@@ -140,20 +141,16 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
         ++ext;
 
     /* check if we have a registered command for the extension*/
-    *cmd = apr_table_get(d->file_type_handlers, ext);
-    if (*cmd == NULL) {
+    new_cmd = apr_table_get(d->file_type_handlers, ext);
+    if (new_cmd == NULL) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                   "Could not find a command associated with the %s extension", ext);
         return APR_EBADF;
     }
-    if (!stricmp(*cmd, "OS")) {
-        /* If it is an NLM then restore *cmd and just execute it */
-        *cmd = cmd_only;
-    }
-    else {
+    if (stricmp(new_cmd, "OS")) {
         /* If we have a registered command then add the file that was passed in as a
           parameter to the registered command. */
-        *cmd = apr_pstrcat (p, *cmd, " ", cmd_only, NULL);
+        *cmd = apr_pstrcat (p, new_cmd, " ", cmd_only, NULL);
 
         /* Run in its own address space if specified */
         detached = apr_table_get(d->file_handler_mode, ext);