You can also try using javacript to print your cookies and then redirect
if you do not want to use CGI.pm. This is what I like to do.
Instead of print location, you can print a page such as this after.
####################################
<html>
<head>
<title> We are redirecting you now </title>
<META HTTP-EQUIV="refresh" CONTENT="0;URL=http://www.wherever1.com">
<script language="JavaScript">
<!--HIDE
document.cookie = 'logged=1';
window.location = 'http://www.wherever1.com';
// END HIDE -->
</script>
</head>
<body>
<a href="http://www.wherever1.com">Click here</a> to continue.
</body>
</html>
##############################################
If the browser supports Javascript, it will redirect right away.
If not, the meta refresh can redirect.
If that does not work, then the user can still click on the link to
continue.
Just a thought.
Troy
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On
> Behalf Of Chris Devers
> Sent: Tuesday, September 25, 2001 12:35 PM
> To: Christian Azambuja Pagot; [EMAIL PROTECTED]
> Subject: RE: Headers...
>
>
> On Tue, 25 Sep 2001, Christian Azambuja Pagot wrote:
>
> > Ok..
> > I will try to explain my problem again (sorry, my english
> is not that
> > good...)
>
> That's okay...
>
> > ======
> > Case 1
> > ======
> > I have a one-line script that consists of:
> >
> > ##### begin #######################################
> > print "Location: http://www.wherever1.com\n";
> > ##### end #########################################
> >
> > It works perfectly... it will cause a redirection in the browser.
>
> ...ok.
>
> > ======
> > Case 2
> > ======
> >
> > ##### begin #######################################
> > print "Set-Cookie: logged=1\n";
> > ##### end #########################################
> >
> > It works perfectly... it will set a cookie in the browser.
>
> ...ok.
>
> > ======
> > Case 3
> > ======
> >
> > ##### begin #######################################
> > print "Set-Cookie: logged=1\n";
> > print "Location: http://www.wherever1.com\n";
> > ##### end #########################################
> >
> > Well... nothing happens here... No redirection occurs,
> neither cookies
> > are set... I inverted the order of the lines.. but the problem
> > persisted.. I read about the syntax of the http headers..
> and it seem
> > to be correct.. at first sight. Actually I have no idea about what
> > could be causing that..
> >
> > I am running the script in a Win2K.. with IIS5... and I am using
> > ActivePerl..
>
> So the headers can't be sent together for you. As someone
> noted yesterday,
> the problem might be that IIS doesn't like doing this. I
> forget what the
> workaround was, but seem to remember that sending Non-Parsed
> Headers (nph)
> could help address the problem, becuase doing so allows you
> to force the
> behavior you're trying to get, at the expense of having to
> make sure that
> all the right headers make it out.
>
> As Lee noted, CGI.pm's cookie handling routines (among
> others) might be
> useful here. Alternatively, you can try to get your code working on a
> non-IIS server (Apache, iPlanet, etc) to see if the script
> itself is fine.
>
>
>
> --
> Chris Devers [EMAIL PROTECTED]
>
> _______________________________________________
> Perl-Win32-Web mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
>
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web