Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Apache2::Cookie troubles... sanity check needed on auth/sess handling

by jimbus (Friar)
on Apr 04, 2006 at 17:59 UTC ( #541204=note: print w/replies, xml ) Need Help??


in reply to Re: Apache2::Cookie troubles... sanity check needed on auth/sess handling
in thread Apache2::Cookie troubles... sanity check needed on auth/sess handling

Based on the recipe, I updated the following to the login page

if ($res->{res}) { my $MAC = Digest::SHA1::sha1_hex($ARGS{username}, "Get the S1gnal!") +; my $cookie = Apache2::Cookie->new ( $r, -name => 'user_login', -value => { user_id => $ARGS{username}, MAC => $MAC }, -path => '/', -domain => 'ruth.dobson.net', -expires => '+1M', ); $r->err_headers_out->add('Set-Cookie' => $cookie); }

It didn't change any thing. is there any way to, if I stop before the redirect, to check and see what whas set or check someplace to see what is happening when I submit the cookie? I'm not sure how to go about debugging this.


--Jimbus aka Jim Babcock
Wireless Data Engineer and Geek Wannabe
jim-dot-babcock-at-usa-dot-com
  • Comment on Re^2: Apache2::Cookie troubles... sanity check needed on auth/sess handling
  • Download Code

Replies are listed 'Best First'.
Re^3: Apache2::Cookie troubles... sanity check needed on auth/sess handling
by perrin (Chancellor) on Apr 04, 2006 at 19:12 UTC
    $r->err_headers_out->add('Set-Cookie' => $cookie->as_string);
    To debug cookie problems, use a browser that shows the headers (lwp-request, Firefox with LiveHTTPHeaders, a logging proxy).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://541204]
help
Chatterbox?
[LanX]: monklinks are automatically converted ...
[LanX]: On another node, I just saw yesterday that the everything engine supports auto-paragraph whithout the need to type <p>
LanX i.e. the newest everything engine
[holli]: nice. i never thought of hosting a script on the site
[LanX]: It's not a perfect solution, since it means invoking the monastery several times, but IMHO still better than hosting on another server
[holli]: i'm surprised it even executes. the server sends text/plain AND a content-dispositio n header

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2017-11-20 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (291 votes). Check out past polls.

    Notices?