https://issues.apache.org/bugzilla/show_bug.cgi?id=52795

--- Comment #4 from Florian Winter <[email protected]> ---
The problem is still the same. Tokenization of the command-line causes the
executable path to be split. This happens in proc_spawn_process in
fcgid_proc_win.c, except a different tokenization function is used now.

A workaround (which only works if the FCGI script does not take any arguments)
is as follows:

/* Build wrapper args */
    // HACK(flw): Whitespace handling is still broken when using ScriptAlias,
so skip tokenization of the command-line
    //apr_tokenize_to_argv(cmdline, (char ***)&wargv, procnode->proc_pool);
    wargv = apr_palloc(procnode->proc_pool, 2 * sizeof(char*));
    wargv[0] = cmdline;
    wargv[1] = NULL;


I tried escaping spaces as "\ " in the ScriptAlias and Directory directives in
httpd.conf. This only causes requests to fail with 403 Forbidden. Can it be
that the paths in Directory and ScriptAlias are parsed differently?

There is no official documentation anywhere about how paths with spaces must be
escaped. I tried to learn about it in the code of apr_tokenize_to_argv, but it
is C code cluttered with preprocessor macros and memory allocations, so I gave
up (working with strings in C is hard. I guess that's why it's broken.../rant)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to