Hi Stas and all;
Here is a test that shows the cookie not able to be retrieved from the env.
The following patch moves the populating of %ENV to the last hook of header_parser, so it should be available already in the Access phase and all phases afterwards. Let me know whether it works for you:
Index: src/modules/perl/mod_perl.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.151 diff -u -r1.151 mod_perl.c --- src/modules/perl/mod_perl.c 4 Feb 2003 06:52:15 -0000 1.151 +++ src/modules/perl/mod_perl.c 24 Feb 2003 04:31:12 -0000 @@ -556,6 +556,23 @@ return OK; }
+static int modperl_hook_header_parser_end(request_rec *r)
+{
+ MP_dDCFG;
+#ifdef USE_ITHREADS
+ modperl_interp_t *interp =
+ modperl_interp_select(r, r->connection, r->server);
+ dTHXa(interp->perl);
+#endif
+
+ /* default is +SetupEnv, skip if PerlOption -SetupEnv */
+ if (MpDirSETUP_ENV(dcfg) || !MpDirSeenSETUP_ENV(dcfg)) {
+ modperl_env_request_populate(aTHX_ r);
+ }
+
+ return OK;
+}
+
static int modperl_destruct_level = 2; /* default is full tear down */ int modperl_perl_destruct_level(void)
@@ -657,6 +674,9 @@
ap_hook_header_parser(modperl_hook_header_parser,
NULL, NULL, APR_HOOK_FIRST);+ ap_hook_header_parser(modperl_hook_header_parser_end,
+ NULL, NULL, APR_HOOK_LAST);
+
ap_hook_child_init(modperl_hook_child_init,
NULL, NULL, APR_HOOK_FIRST);@@ -800,11 +820,6 @@ #endif
modperl_perl_global_request_save(aTHX_ r);
-
- /* default is +SetupEnv, skip if PerlOption -SetupEnv */
- if (MpDirSETUP_ENV(dcfg) || !MpDirSeenSETUP_ENV(dcfg)) {
- modperl_env_request_populate(aTHX_ r);
- } /* default is +GlobalRequest, skip if PerlOption -GlobalRequest */
if (MpDirGLOBAL_REQUEST(dcfg) || !MpDirSeenGLOBAL_REQUEST(dcfg)) {
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
