Posted by Eric on 12/20/05 03:34
I'm playing around with cookies mostly as a learning experience.
I cant seem to get an html page to set a cookie. I'm a bit confused
about headers , which to send first etc.
Here's my strategy
....
<body>
<!--#exec-cgi="/cgi-bin/setcookie.cgi" -->
</body>
The cgi just writes
"Set-Cookie: hello=its_me" to stdout
My question is:
is this correct?
int main(void) {
printf("Set-Cookie: hello=its_me\n");
printf("Content-type: text/html\n\n");
return 0;
}
Because i dont see a cookie show up on disk on the client side.
And there are no errors in my apache 2.2 logs (linux based system)
And also, my client is IE6 on windows and its not blocking cookies.
I watch the cookies dir under Documents and settings and the cookie
never shows up, although i can see cookies arrive from other places
like google.
Can someone straighten me out here?
Thanks
Eric
[Back to original message]
|