Project

General

Profile

Bug #729 ยป 729.patch

One slightly hacky fix for mod_fastcgi, needs porting to mod_scgi (and more testing!) - dg, 2006-11-03 20:57

View differences:

mod_fastcgi.c (local)
*
* SCRIPT_NAME = /fcgi-bin/foo
* PATH_INFO = /bar
*
* if prefix = /
*
* /foo/bar
*
* SCRIPT_NAME =
* PATH_INFO = /foo/bar
*
*/
/* the rewrite is only done for /prefix/? matches */
if (extension->key->ptr[0] == '/' &&
con->uri.path->used > extension->key->used &&
NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
/* Special case for "/" */
((extension->key->ptr[1] == '\0' && (pathinfo = con->uri.path->ptr))
|| (con->uri.path->used > extension->key->used &&
NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))))) {
/* rewrite uri.path and pathinfo */
buffer_copy_string(con->request.pathinfo, pathinfo);
    (1-1/1)