Project

General

Profile

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)
3480 3480
			 *
3481 3481
			 * SCRIPT_NAME = /fcgi-bin/foo
3482 3482
			 * PATH_INFO   = /bar
3483
                         *
3484
                         * if prefix = /
3485
                         *
3486
                         * /foo/bar
3487
                         *
3488
                         * SCRIPT_NAME = 
3489
                         * PATH_INFO = /foo/bar
3483 3490
			 *
3484 3491
			 */
3485 3492

  
3486 3493
			/* the rewrite is only done for /prefix/? matches */
3487 3494
			if (extension->key->ptr[0] == '/' &&
3488
			    con->uri.path->used > extension->key->used &&
3489
			    NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
3495
                            /* Special case for "/" */
3496
                            ((extension->key->ptr[1] == '\0' && (pathinfo = con->uri.path->ptr))
3497
                            || (con->uri.path->used > extension->key->used &&
3498
			        NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))))) {
3490 3499
				/* rewrite uri.path and pathinfo */
3491 3500

  
3492 3501
				buffer_copy_string(con->request.pathinfo, pathinfo);