dgaudet 98/01/27 02:28:34
Modified: . STATUS src CHANGES src/modules/standard mod_unique_id.c Log: don't generate a second id on internal_redirects Revision Changes Path 1.134 +1 -0 apache-1.3/STATUS Index: STATUS =================================================================== RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.133 retrieving revision 1.134 diff -u -r1.133 -r1.134 --- STATUS 1998/01/27 08:38:45 1.133 +++ STATUS 1998/01/27 10:28:29 1.134 @@ -137,6 +137,7 @@ * [Port] Fix CGI-Execution for EBCDIC hosts. * Martin's [PATCH] "Signing" server generated pages * Dmitry's table_*n API addition + * mod_unique_id didn't deal with internal_redirect properly Available Patches: 1.602 +4 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.601 retrieving revision 1.602 diff -u -r1.601 -r1.602 --- CHANGES 1998/01/27 05:35:27 1.601 +++ CHANGES 1998/01/27 10:28:31 1.602 @@ -1,5 +1,9 @@ Changes with Apache 1.3b4 + *) mod_unique_id was erroneously generating a second unique id when + an internal redirect occured. Such redirects occur, for example, + when processing a DirectoryIndex match. [Dean Gaudet] + *) table_add, table_merge, and table_set include implicit pstrdup() of the key and value. But in many cases this is not required because the key/value is a constant, or the value has been built 1.11 +9 -0 apache-1.3/src/modules/standard/mod_unique_id.c Index: mod_unique_id.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_unique_id.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_unique_id.c 1998/01/26 19:50:25 1.10 +++ mod_unique_id.c 1998/01/27 10:28:33 1.11 @@ -281,6 +281,15 @@ char str[19 + 1]; const unsigned char *x; unsigned short counter; + char *e; + + /* copy the unique_id if this is an internal redirect (we're never + * actually called for sub requests, so we don't need to test for + * them) */ + if (r->prev && (e = table_get(r->subprocess_env, "REDIRECT_UNIQUE_ID"))) { + table_setn(r->subprocess_env, "UNIQUE_ID", e); + return DECLINED; + } cur_unique_id.stamp = htonl(r->request_time);