OK, So I mangled things around and now I can get the cookie written 
using CGI.PM
It looks something like this:
----------------------------------------
my $q = new CGI;
my $cookie = $q->cookie( -name    => $COOKIENAME,
                          -value   => $cookieContent,
                          -domain  => "www.wpi.edu",
                          -expires => "+1h",
                          -path    => "/cgi-bin/Regi",
                          -secure  => 1 );
print $q->header(-cookie=>$cookie);
----------------------------------------
But this has introduced a new problem.
The very next thing I am doing in my script is forwarding the user to a
different script, just with a simple print "Location: ...\n\n" command.
But now that the header has been printed with CGI, this does not work.  
Is there
any way for me to forward the user on to another page at this point?
Any advice?

Thanks again.
--Alex
Quoting [EMAIL PROTECTED]:
> Quoting Philipp Hanes <[EMAIL PROTECTED]>:
>
>>
>>> Here is the code I started with and have reverted back to:
>>> ----------------------------------------------
>>> my $cookie = "Set-Cookie: " .
>>>     "$COOKIENAME=$cookieContent; " .
>>>     "Host=www.wpi.edu; " .
>>>     "expires=+1h\n";
>>> print $cookie;
>>> ----------------------------------------------
>>
>> One thing I notice is that the RFC mentions "Domain" and not "Host"
>>
>> http://www.faqs.org/rfcs/rfc2965.html
>>
>> Also, "Version" is required, according to that document.
>>
>> It's been a long time since I built cookies by hand, but perhaps the cookie
>> is being rejected because it does not conform?
>>
>>
>
>
>
>
> _______________________________________________
> Boston-pm mailing list
> Boston-pm@mail.pm.org
> http://mail.pm.org/mailman/listinfo/boston-pm
>



 
_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to