perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler MacDonald <>
Subject Re: any way to stop REDIRECT_ env prefix?
Date Tue, 21 Feb 2006 19:23:03 GMT
Tyler MacDonald <> wrote:
> I'm writing a handler whose goal is to set an environment variable, then
> issue an internal redirect to another page;
>   $r->subprocess_env("FOO", "bar");
>   $r->internal_redirect("/somewhere/else");
> The problem is that when the redirected page loads, my "FOO" environment
> variable has become "REDIRECT_FOO".

	I've gotten a bit closer:

	my $subr = $r->lookup_uri("/somewhere/else");
	$subr->subprocess_env("FOO", $r->subprocess_env("FOO"));

	The problem with that code is that it doesn't seem to obey the
content-type set by the redirected handler. Also, all of the REDIRECT_
environment variables are gone in the subrequest. I don't care that the
REDIRECT_ variables are gone, except that it seems to indicate that
internal_redirect is doing some other magic between looking up a subrequest
and running it that I need to do also.. although from the documentation it's
not obvious what that step is. :-/ Any ideas?


View raw message