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:52AM messages near this date
view in the new Beta List Site
Re: Quick Cookie Question, with CGI.pm. | Re: Quick Cookie Question, with CGI.pm.
On Wed, 15 May 2002 barons@[...].net wrote:

>  I kind of leaned towards that because nothing I could find
>   said anything about sending a cookie and basically
>   redirecting at the same time. I took your advice and did
> 
>  print $query->header(-cookie => $send_it);
>  print  qq(<META HTTP-EQUIV="Refresh" CONTENT="0;
>   URL=http://localhost/test/">);
> 
>  This worked like a charm. Funny thing though. Sending the
>   cookie in the redirect like stated below worked in
>   Netscape. But not IE. Usually it's the other way around.
>   During reading up on this I kept seeing issues with the
>   cache, and the problems with using the redirect. I don't
>   know. Thank all for the help.
> 
>  Allan
> 
> 
> 
>  On Wed, 15 May 2002 22:18:30 -0400 (EDT)
>   Carl Jolley <cjolley@[...].net> wrote:
>  > 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.
>  >

You might try fully fleshing out the dummy html page with
a <HTML> <HEAD><META ...></HEAD><BODY></BODY></HTML>
to see if IE likes that better.

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

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
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