I can both see the cookie being sent in the browser, and I can view the cookie 
itself on the filesystem after its been created...
 
After the cookie has been set...
 
my $req = APR::Request::Apache2->handle( $r );
my $jar = $req->jar;
print $req->jar_status();
 
Just gives me the error of "Missing Input Data" and I'm sure apreq2 is loaded.
 
Man, I wish getting rid of CGI.pm was as easy as using it :) - Back to the 
drawing board!!
 
Thanks
-Chris

 
________________________________

From: Clinton Gormley [mailto:[EMAIL PROTECTED]
Sent: Sat 12/9/2006 10:00 AM
To: cfaust-dougot
Cc: modperl@perl.apache.org
Subject: RE: Apache2::Cookie/APR::Request::Cookie



On Sat, 2006-12-09 at 09:37 -0500, cfaust-dougot wrote:
> Thanks for the reply Clinton, I was just using the same request obj
> from the handler, guess that was wrong :)
> 
> I tried your read example and now I don't get anything at all (even
> though I can see the cookie on the machine)

What do you mean by 'I can see the cookie on the machine'?

Can you see in the browser that it is being set?


> 
>         my $req = APR::Request::Apache2->handle( $r );
>         my $jar = $req->jar;

Try : print $req->jar_status();
and see : perldoc APR::Request

>         my %cookies;
>         foreach my $key ( keys %$jar ) {
>             print "Key is $key and value is " . $jar->get($key);
>    $cookies{$key} = $jar->get($key);
>         }
> 
> And if I do just this
> 
>         my $req = APR::Request::Apache2->handle( $r );
>         my $jar = $req->jar;
>   my $cookie = $jar->get('ISMH_SESSION_ID');
> 
> I get the error of "Can't call method "get" on an undefined value"
> 
> If it matters, I load the modules in my startup.pl
> use Apache2::Request ();
> use Apache2::RequestRec ();
> use Apache2::Cookie ();
> use Apache2::Const -compile => qw(REDIRECT);
> use Apache2::Const -compile => qw(OK);
> use APR::Table ();
> use APR::Request ();
> use APR::Request::Cookie ();
>
> Am I doing anything that is clearly wrong?

Not to me, but it is too long since I wrote my code to remember the
issues I had. I remember it took me a while to get it write.

Here is what I use at the top of my module:
use APR::Request qw/encode decode/;
use APR::Request::Apache2();
use APR::Request::Param();
use APR::Request::Cookie();
use APR::Table();

Are you sure that libapreq is correctly installed?  Did you run make
test?  Is it loaded in your httpd.conf file?

I'm clutching at straws....

good luck

clint




Reply via email to