ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-users
perl-win32-users
Re: Quick Cookie Question, with CGI.pm.
by Carl Jolley other posts by this author
May 16 2002 2:18AM messages near this date
view in the new Beta List Site
Quick Cookie Question, with CGI.pm. | Re: Quick Cookie Question, with CGI.pm.
On Wed, 15 May 2002 barons@[...].net wrote:

>  I know that the cookie has to be sent with the header. But
>   i'm having a problem sending a cookie and then
>   redirecting.
> 
>  print $query->header(-cookie => $sendcookie);
>  print $query->redirect(-uri=>'http://www.yahoo.com/');
> 
>  This will send the cookie but prints the 303 error message
>   from CGI.pm. How can I send the cookie and redirect at the
>   same time.
> 
>  Any help greatly appreciated.

That's because when you redirect, that's all you can do. The only similar
thing that you might try is to send the cookie and then for your response
send a dummy page with an HTTP-META-equiv tag in the <HEADER>  specifying a
refresh with a timeout of zero and also with the URL that you want to
redirect to. That should result in the cookie being sent and the browser
being redirected without showing any content of the dummy page.

**** cjolley@[...].net <Carl Jolley> 
**** All opinions are my own and not necessarily those of my employer ****
Thread:

Carl Jolley
Carl Jolley

Carl Jolley

Carl Jolley
$Bill Luebkert
$Bill Luebkert


$Bill Luebkert
$Bill Luebkert

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved