--00148530aad10cf1e70485b01407
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi again,
Subrequests are giving me a hard time :) I managed to use is_initial_req()
in my PATH_INFO subrequests, thanks to your previous answer. But I ran into
another subrequest : internal REDIRECT. My problem was that the subrequest
gets a ResponseHandler call, this time, so I need to have it access the
session perl variable used by the main request (I can't tie two variables t=
o
the same Apache::Session::File file because I'm trying to use Transactional
mode).
Initially, I thought that I would be able to use $r->main() to get the main
request and access $r->main()->pnotes() to get my value. But $r->main()
returns undef even though $r->is_initial_req() returns 0 :-(
Sequence :
[Fixup] /perl/script1.pl
[Response] /perl/script1.pl /// prints Location: /perl/script2.pl\n\n and
returns Apache2::Const::REDIRECT
-- no [CleanUp] for /perl/script1.pl here
[Fixup] /perl/script2.pl //// $r->is_initial_req() returns 0 and $r->main(=
)
returns undef
According to the
documentation<http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C=
_main_>,
this shouldn't happen, right?
Is there another way to access the main request ?
Is there another way to share perl variables between a request and its
subrequests ?
Thanks for your time,
C=E9dric Bertolini
--00148530aad10cf1e70485b01407
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<font color=3D"#663300"><font face=3D"georgia,serif">Hi again,<br><br>Subre=
quests are giving me a hard time :) I managed to use is_initial_req() in my=
PATH_INFO subrequests, thanks to your previous answer. But I ran into anot=
her subrequest : internal REDIRECT. My problem was that the subrequest gets=
a ResponseHandler call, this time, so I need to have it access the session=
perl variable used by the main request (I can't tie two variables to t=
he same Apache::Session::File file because I'm trying to use Transactio=
nal mode).<br>
<br>Initially, I thought that I would be able to use $r->main() to get t=
he main request and access $r->main()->pnotes() to get my value. But =
$r->main() returns undef even though $r->is_initial_req() returns 0 :=
-(<br>
<br>Sequence :<br><br>[Fixup] /perl/<a href=3D"http://script1.pl">script1.p=
l</a><br>[Response] /perl/<a href=3D"http://script1.pl">script1.pl</a> /// =
prints=A0 Location: /perl/<a href=3D"http://script2.pl">script2.pl</a>\n\n =
and returns Apache2::Const::REDIRECT<br>
-- no [CleanUp] for /perl/<a href=3D"http://script1.pl">script1.pl</a> here=
<br>[Fixup] /perl/<a href=3D"http://script2.pl">script2.pl</a>=A0 //// $r-&=
gt;is_initial_req() returns 0 and $r->main() returns undef<br><br>Accord=
ing to the <a href=3D"http://perl.apache.org/docs/2.0/api/Apache2/RequestRe=
c.html#C_main_">documentation</a> , this shouldn't happen, right? <br>
<br>Is there another way to access the main request ?<br>Is there another w=
ay to share perl variables between a request and its subrequests ? <br><br>=
<br>Thanks for your time,<br>C=E9dric Bertolini<br><br></font></font>
--00148530aad10cf1e70485b01407--
