iWire has asked for the wisdom of the Perl Monks concerning the following question:
When I fill out a login form that gets send to the script (below) I receive the following error:
Below is the code for the script------------------------ Set-Cookie: loggedin=confirmed; path=/; expires=Mon, 07-Dec-2009 07:56 +:19 GMT Date: Mon, 07 Dec 2009 07:46:19 GMT Refresh: 1, https://www.m +ydomain.com/EAM/cgi-bin/admin/messageadmin.pl?action=list Content-Typ +e: text/html; charset=ISO-8859-1 ------------------------
START CODE ------------------------ use CGI; $q = new CGI; if (!$q->cookie('loggedin')) { if ($q->param('username') eq "XXXX" && $q->param('password') eq "XXX +X") { if ($q->param('action') && $q->param('id')) { $action = $q->param('action'); $id = $q->param('id'); $cookie = $q->cookie(-name => 'loggedin', -value => 'confirmed', + -expires => '+10m'); print $q->header(-cookie => [$cookie], -refresh => "1, https://w +ww.mydomain.com/EAM/cgi-bin/admin/messageadmin.pl?action=$action&id=$ +id"); } elsif ($q->param('action')) { $action = $q->param('action'); $cookie = $q->cookie(-name => 'loggedin', -value => 'confirmed', + -expires => '+10m'); print $q->header(-cookie => [$cookie], -refresh => "1, https://w +ww.mydomain.com/EAM/cgi-bin/admin/messageadmin.pl?action=$action"); } else { $cookie = $q->cookie(-name => 'loggedin', -value => 'confirmed', + -expires => '+10m'); print $q->header(-cookie => $cookie, -refresh => '1, https://www +.mydomain.com/EAM/cgi-bin/admin/messageadmin.pl?action=list'); } } } else { print $q->redirect('https://www.mydomain.com/EAM/cgi-bin/admin/messa +geadmin.pl'); } END CODE------------------------
I'm in a real bind and I have no perl experience. Any help would be greatly appreciated.
Many thanks
Lee
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Outputs Headers after server change
by AnomalousMonk (Archbishop) on Dec 07, 2009 at 12:01 UTC | |
|
Re: Outputs Headers after server change
by Anonymous Monk on Dec 07, 2009 at 13:00 UTC | |
by iWire (Initiate) on Dec 08, 2009 at 01:12 UTC | |
by gmargo (Hermit) on Dec 08, 2009 at 01:48 UTC |