Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-12 Thread Fred Moyer
On Mon, 13 Mar 2006, Foo Ji-Haw wrote: Hello Fred, Ok, the 12 layers of Apache is as cool as the OSI layers. Let's say that in my PerlAuthzHandler I verified the user via a cookie (given to the client You will want to use a PerlAuthenHandler to authenticate the user. during login). It sound

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-12 Thread Foo Ji-Haw
Hello Fred, Ok, the 12 layers of Apache is as cool as the OSI layers. Let's say that in my PerlAuthzHandler I verified the user via a cookie (given to the client during login). It sounds like double work to retrieve the user details again during the PerlResponseHandler phase (I have to do that

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-12 Thread Fred Moyer
On Mon, 13 Mar 2006, Foo Ji-Haw wrote: Wow, a little tangent to the topic here: I didn't know that you can do this PerlResponseHandler Apache2::Const::OK Is that 'legal'? It's interesting to know, but I wouldn't know of a practical use for this trick. Specifying a return code for a handler pha

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-12 Thread Foo Ji-Haw
Wow, a little tangent to the topic here: I didn't know that you can do this PerlResponseHandler Apache2::Const::OK Is that 'legal'? It's interesting to know, but I wouldn't know of a practical use for this trick. Another question: why do you use CGI::Cookie in place of Apache2::Cookie? Last qu

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-11 Thread yperl
Hi Geoffrey ! Nothing's wrong. I think that happens because I'm using a bleding edge Apache 2.2.0, mod_perl from svn, Perl 5.8.8 ... I preferer put double checks in my getCookie() to deal with both situations. I know that Cookie is a request header, but this is the uniq solution I found after

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-11 Thread Geoffrey Young
yperl wrote: > Finally I come with a working solution. > > sub getCookie { > > my ( $r ) = @_; > > # check for both 'Cookie' and 'Set-Cookie' HTTP headers > return $r->headers_in->{'Cookie'} || $r->headers_in->{'Set-Cookie'}; > } but that's just wrong :) Set-Cookie is a response header, s

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-11 Thread yperl
Finally I come with a working solution. sub getCookie { my ( $r ) = @_; # check for both 'Cookie' and 'Set-Cookie' HTTP headers return $r->headers_in->{'Cookie'} || $r->headers_in->{'Set-Cookie'}; } Hope this help new comers like me. Thanks again guys Thanks Fred Younes yperl a écrit :

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-11 Thread yperl
Your'e right Fred. The cookie is correctly sent. The problem is that Apache doesn't sent the correct cookie header. He sent 'Set-Cookie' instead of 'Cookie' (like in your case). Here is what I've got: # lwp-request -USe http://coro/gdlweb/resolver GET http://coro/gdlweb/resolver User-Agent: lwp

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-11 Thread Fred Moyer
yperl wrote: unfortunately no. I've already tried this. Sometimes bad cookies leave no crumbs and are especially hard to track down. I'm guessing this has to do with the specifics of your cookie values - can you show us the exact code you used to create it? I was able to successfully bake

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-11 Thread yperl
unfortunately no. I've already tried this. Frank Wiles a écrit : On Sat, 11 Mar 2006 02:42:20 +0100 yperl <[EMAIL PROTECTED]> wrote: I've tried everything I found (in mailing lists, suggestions, web doc) to send cookie from a PerlAccessHandler, but without success. Before giving up, I woul

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-10 Thread Frank Wiles
On Sat, 11 Mar 2006 02:42:20 +0100 yperl <[EMAIL PROTECTED]> wrote: > I've tried everything I found (in mailing lists, suggestions, web doc) > to send cookie from a PerlAccessHandler, but without success. > > Before giving up, I would like to have an answer from the mod_perl2 > authors if it is

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-10 Thread yperl
Hi there! I've tried everything I found (in mailing lists, suggestions, web doc) to send cookie from a PerlAccessHandler, but without success. Before giving up, I would like to have an answer from the mod_perl2 authors if it is possible. Here is my http.conf dealing with that: --

Re: Modperl2 + PerlAccessHandler + Sending Cookie

2006-03-10 Thread yperl
I'm generating the cookie with CGI::Cookie(). I think the problem is elsewhere >From a PerlResponseHandler, the method I described works, but I got the problem within a PerlAccessHandler. Should I delegate the cookie generation to the PerlResponseHandler ? Younes ---Message d'origine >Dat