Steffers wrote:
> 
> Drew wrote:
> > Steffers wrote:
> > >         my $header_ID=$r->header_in('sessionID');
> > If you're trying to get at the cookie, this is not the way. Either use
> > Apache::Cookie or CGI.pm to get the cookie contents.
> >
> 
> okay. I have changd the line to the usual
> 
> my $header_ID=cookie(-name=>'sessionID');
Going by your previous example, you should use 

$cookie = $r->header_in('Set-Cookie');
# stuff if you cookie value contains more then 
# just the sessionID - ie ID=1234567&foo=bar

You might also want to take a look at headers_in() (that's PLURAL). It
is a little more flexible in retrieving values.

> > This code is good. But it doesn't jive with what you have above. Try
> > making the first handler() actually get the cookie. Or am I missing
> > something?
> 
> nope. i thought that header_in would get the cookie, and now
> i understand that it would if i had 'header_in('Set-Cookie')'
> (or maybe jst cookie) and then i would have to parse out the
> values myself.
If using the header_in() method, you have to get 'Set-Cookie'
(case-insensitive). It's part of the HTTP headers sent in the original
request.

> I jst dont understand quite what I am doing wrong. I know that i
> could get standard modules and +maybe+ get the functionality
> i want, but i would rather learn about Apache+perl than jst
> take some code at face value.
I can't say off the top of my head. Have you read the mod_perl book?
Chapter 6 is all about authentication & Authorization. Reading it might
help you understand the concepts better. As for your code, I
unfortuntely am not sure where to tell you to start.

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/

Reply via email to