akosut 96/12/15 14:06:55
Modified: src CHANGES util_script.c Log: Add FILEPATH_INFO env variable, which contains the old-style PATH_INFO. Reviewed by: Ben Laurie, Randy Terbush Revision Changes Path 1.87 +4 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.86 retrieving revision 1.87 diff -C3 -r1.86 -r1.87 *** CHANGES 1996/12/12 17:01:59 1.86 --- CHANGES 1996/12/15 22:06:53 1.87 *************** *** 1,5 **** --- 1,9 ---- Changes with Apache 1.2b3: + *) Add FILEPATH_INFO variable to CGI environment, which is equal to + PATH_INFO from previous versions of Apache (in certain situations, + Apache 1.2's PATH_INFO will be different than 1.1's). [Alexei Kosut] + *) Add rwrite() function to API to allow for sending strings of arbitrary length. [Doug MacEachern] 1.30 +11 -0 apache/src/util_script.c Index: util_script.c =================================================================== RCS file: /export/home/cvs/apache/src/util_script.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C3 -r1.29 -r1.30 *** util_script.c 1996/12/09 01:00:40 1.29 --- util_script.c 1996/12/15 22:06:53 1.30 *************** *** 236,241 **** --- 236,252 ---- table_set (e, "PATH_INFO", r->uri + path_info_start); } + /* Some CGI apps need the old-style PATH_INFO (taken from the + * filename, not the URL), so we provide it in a different env + * variable. CGI scripts can use something like (in Perl) + * $path_info = $ENV{'FILEPATH_INFO'} || $ENV{'PATH_INFO'}; + * to get the right information with both old and new + * versions of Apache (and other servers). + */ + + if (r->path_info && *r->path_info) + table_set (e, "FILEPATH_INFO", r->path_info); + if (r->path_info && r->path_info[0]) { /* * To get PATH_TRANSLATED, treat PATH_INFO as a URI path.