Click here to get back home

mod_perl2 passing env vars when doing internal_redirects

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
mod_perl2 passing env vars when doing internal_redirects markus.rietzler 07-11-2005
Get Chitika Premium
Posted by markus.rietzler on July 11, 2005, 8:24 am
Please log in for more thread options


i am porting a mod_perl module from mod_perl1 to mod_perl2.

the script does an internal_redirect and sets some environment-vars. if
the "check" is valid the "REMOTE_USER" is set. this works perfect in
mod_perl-1.29

$r->log_error("Do the User Check ==> $check eq $key");
if ($check eq $key) {
# set REMOTE_USER
# $r->connection->user($user); # in mod_perl_1.x
$r->user($user); # in mod_perl_2.x
$r->log_error("Redirect_User ==> $uri");
}
$r->log_error("Do the Internal-Redirect ==> $uri");
$r->internal_redirect($uri);
return HTTP_MOVED_TEMPORARILY;

the same code in mod_perl2 is not working. after chaning some mehtods
and do the "renaming" required for mod_perl2 the redirect is done but i
only get an environment var "REDIRECT_REMOTE_USER". how can i do an
internal redirect but set (or keep) the env-vars during/after redirect?

thanxs

markus



Posted by markus.rietzler on July 12, 2005, 5:06 am
Please log in for more thread options


just found out, that with apache 2.0.48 REDIRECT_REMOTE_USER is set in
internal_redirects if the new url is not protected via auth. so this
has nothing to do with mod_perl2 etc.
so we now have to look in REDIRECT_REMOTE_USER.

the old thing with "read the manuals"...

markus



Similar ThreadsPosted
CGI.pm/modperl2 and intermittent missing POST data July 15, 2006, 3:18 am
Passing a DBI connection between [Unix] processes January 7, 2005, 1:01 pm
Options for passing Hash to a subroutine. March 30, 2005, 7:39 pm
Passing username and password using LWP::UserAgent December 11, 2006, 4:40 am
Passing Environment and ExtUtils::MakeMaker options to CPAN methods August 5, 2005, 8:42 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap