Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI.pm Set Cookie and Redirect

Status
Not open for further replies.

msmamet

Programmer
Feb 9, 2003
6
US
Here is a simple script I developed called logout.cgi

#!/usr/bin/perl
use CGI;
$query = CGI::new();

$logincookie = $query->cookie(
-name => "login2451953.123",
-value => ['', '', ''],
-path => '/',
-expires => '-1d'
);

print $query->redirect(-cookie=>$logincookie, -uri=>'/site/content/login.asp');


When i go to logout.cgi in my browser, i see the following:
Status: 302 Moved
Set-Cookie: login2451953.123=&&; path=/; expires=Tue, 04-Nov-2003 12:52:06 GMT
Date: Wed, 05 Nov 2003 12:52:06 GMT
Location: /site/content/login.asp

it looks like the perl is being executed, and the headers being sent, but what is causing the 302 problem?

I have checked my browser settings, and I am able to accept cookies, etc.
Any help would be greatly appreciated!
Thanks,
Matthew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top