Commit 3891957f authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  For Win32 cgi %1 arguments, use backslashes.  For $1, use posix slashes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91617 13f79535-47bb-0310-9956-ffa450edef68
parent 5a4aba09
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -302,8 +302,16 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp, const c
            continue;
        }
        if (((*ch == '$') || (*ch == '%')) && (*(ch + 1) == '1')) {
            /* Todo: Make short name!!! */
            prgtaken = 1;
            arg = (const char**)apr_array_push(args);
            if (*ch == '%') {
                char *repl = apr_pstrdup(p, cgiprg);
                while ((repl = strchr(repl, '/')))
                    *repl++ = '\\';
                *arg = repl;
            }
            else
                *arg = cgiprg;
            ch += 2;
            continue;
@@ -313,6 +321,13 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp, const c
                                                  && (*(ch + 3) == '\"')) {
            prgtaken = 1;
            arg = (const char**)apr_array_push(args);
            if (*(ch + 1) == '%') {
                char *repl = apr_pstrdup(p, cgiprg);
                while ((repl = strchr(repl, '/')))
                    *repl++ = '\\';
                *arg = repl;
            }
            else
                *arg = cgiprg;
            ch += 4;
            continue;