help-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Cookie Help


From: Stephen F. Booth
Subject: RE: Cookie Help
Date: Sat, 20 Jan 2001 12:37:28 -0600

Hi David,

You don't need the endl after cout. HTTP headers are separated from one
another by \r\n, and from the body of the HTTP message by \r\n\r\n.  So
inserting another \n will probably mess up the headers somehow.  To set a
cookie with the name 'count' and value of '1', followed by an HTML document,
something like:

cout << HTTPCookie("count","1") << HTTPHTMLHeader();

should work.

Incidentally, there was a bug in the cookie parser (related to whitespace)
that is fixed in CVS, but not yet released.

-Stephen

-----Original Message-----
From: address@hidden [mailto:address@hidden Behalf Of
David Gholami
Sent: Wednesday, January 17, 2001 7:22 PM
To: address@hidden
Subject: Cookie Help




I'm completely new to this cookie stuff so any help would be great.
Basicly what I am trying to do is send a cookie with the web page. Easy
enough, if anyone could post some c code on how to use cookies with cgicc,
it would just make my day :)
Right now this is how my code looks like
cout << HTTPCookie<< endl;
But I do not send the header out, and if I try and send the header before
cout << HTTPCookie << endl; in the browser you see Set-Cookie:..... and if I
set the header after cout << hTTPCookie << endl; in the browser it shows
Content-Type: text/html
ps, if you could also post some usefull cookie functions that you think I
would need, I would not mind.
Thanks



Get your FREE download of MSN Explorer at http://explorer.msn.com

_______________________________________________ help-cgicc mailing list
address@hidden http://mail.gnu.org/mailman/listinfo/help-cgicc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]