[fpc-pascal]CGI cookies management

Vassilis Stathopoulos vstath at irismedia.gr
Sat May 11 13:00:34 CEST 2002


Again,

if someone has some code, feel free to send. To others, perhaps this is a 
start (using uncgi unit):

     cgi_init;
     writeln ('Set-Cookie: UID=myname; expires=Saturday, 11-May-2022 
02:58:49 GMT;  domain=.mydomain.com; path=/');
     writeln ('Set-Cookie: PASS=abcdefg; expires=Saturday, 11-May-2022 
02:58:49 GMT;  domain=.mydomain.com; path=/');
     Set_Content ('text/html');

     writeln('Cookie:'+getenv('HTTP_COOKIE')); // prints the cookies 
delimited by semi colon ";"

Vassilis


>is anyone aware of an existing implementation of CGI cookies management in 
>FPC code? I am considering using cookies on a small CGI application and it 
>would save me a lot of time if I could work on existing code.
>
>Any help is much appreciated.





More information about the fpc-pascal mailing list