Re: New to ModPerl 2
[prev]
[thread]
[next]
[Date index for 2004/11/16]
I've used the following for about 6 months without any problem for
reading cookies:
# just copied all Apache related "use", not all needed for the sample
code below of course
use Apache::Connection;
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Request();
use APR::Brigade ();
use APR::Table();
use Apache::Const -compile => qw(OK);
use Apache::Cookie ();
*snip*
$self->{ApRequest}=shift;
*snip*
$hrCookies=Apache::Cookie->fetch ($self->{ApRequest});
foreach $ckey (keys %{$hrCookies}){
*snip*
}
For writing cookies however, I (still) use
$self->{ApRequest}->headers_out->add("Set-Cookie" => $cookie);
because I was not able to let it work with Apache::Cookie. It's possible
of course that the problem I had for writing cookies is solved in the
meanwhile (I've not tried again with newer versions because lack of
time, and this also works fine).
I'm now using Apache 2.0.50, modperl 1.99_16 and libapreq2-2.04
-- Stef
Jonathan Vanasco wrote:
>
> I'm just wondering how people have handled cookie stuff before --
>
> There seems to be a group that has encountered this error, and another
> group that has not -- if anyone is a member of the latter group and
> can share their approach to cookie/request handling (assuming its more
> than just substituting a ($r = shift;) with a ($req
> =Apache::Request->new($r)) i'd love to see it
>
> On Nov 16, 2004, at 8:31 AM, Joe Schaefer wrote:
>
>> OK, thanks! This bug should be fixed with
>> the next release. It's a bit tricky to
>> fix this, because Apache::Request doesn't
>> always inherit from the environment object.
>
>
>
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
 |
(message missing)
|