{{tag>category:"OpenInsight 32-bit Specific"}} [[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== The Cookie Monster (OpenInsight 32-bit Specific) ==== === At 13 APR 2005 09:00:12PM Robert Lee wrote: === Hi all I have attempted to read all I can about cookies available on this website, without having any success in getting them to work. Can someone please provide some sample Basic+ code that works. The following code excerpt only displays the following text in the browser. Set-Cookie: client=66; expires=Thu 28-APR-2005 00:00:00 GMT html = '' html= ' ' html= ' Life is 4 Living - ': Title : '' html= ' ' html= ' Set-Cookie: client=66; expires=Thu 28-APR-2005 00:00:00 GMT' html = ' ' TIA R ---- === At 14 APR 2005 01:43AM support@sprezzatura.com wrote: === Did this tip not work for you? support@sprezzatura.com The Sprezzatura Group Web Site [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 14 APR 2005 04:20PM Robert Lee wrote: === Hi Sprezz Thats the code I was copying from. You will notice about the only thing different is the date for cookie to expire. Browsers is IE6, Windows XP R ---- === At 14 APR 2005 07:20PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Robert, The Set-Cookie item must be inserted as an HTTP Header item, not as a tag in the HTML head section. With OECGI we normally do this in INET_FINALIZE just before the response gets fed back to the client, but you can do it elsewhere if you wish. To set HTTP Headers in OECGI you must place them BEFORE the html you are returning, and the first line must be the Content-Type. They are basically a CRLF delimited series of lines with a blank line before the start of the html. So to use the example given: * html contains the webpage to send back ... httpHdr=Content-type: text/html":\0A\ httpHdr := "Set-Cookie: client=66; expires=Thu 08-DEC-1999 00:00:00 GMT":\0A\ httpHdr := \0A\ html=httpHdr : html [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 15 APR 2005 07:30PM Robert Lee wrote: === Hi Sprezz Thank you - that clarifies things nicely & I think progress is being made. The Set_Cookie: line is no longer displaying as text, so I am assuming the cookie is being set correctly. Not that I have been able to locate the Cookies.txt file anywhere. (Windows ME). There is also nothing the \Windows\Temp\Cookies folder. I have also displayed the HTTP.Request that comes in from the next HTML Page, hoping I might find my cookie in there somewhere, but alas it isn't. How do I get my cookie back now that it presumably being set correctly? R ---- === At 18 APR 2005 04:55AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Robert, Have you set an expiry date? What string are you passing as the cookie header? Make sure it hasn't expired (as the one in the example we used would have done :) If you don't set an expires field the cookie will only last for the lifetime of the browser. It might not get saved to disk. If you try and set a cookie and then run an INET_TRACE you should see the cookie name and value appear in the trace results (HTTP_COOKIE$ - field 8 of the HTTPRequest variable as passed to your INET_ procs) [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 18 APR 2005 06:38PM Robert Lee wrote: === Hi Sprezz Thank you, I have got it nailed now. The cookie monster is defeated. Thats worth at least a pint of Theakstons next time I'm in London. Cheers R ---- === At 19 APR 2005 04:21AM support@sprezzatura.com wrote: === Theakston's it is - unless it's Carl in which case it'll be Hoegaarden :). support@sprezzatura.com The Sprezzatura Group Web Site [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 19 APR 2005 05:29PM Robert Lee wrote: === Correct me if I am wrong, but isn't it true that England doesn't make a single lager of its own? Good thing the real ale is so good. R ---- === At 20 APR 2005 05:01AM support@sprezzatura.com wrote: === Not entirely true - but close :) http://www.realbeer.com/library/authors/tierney-jones-a/lager.php support@sprezzatura.com The Sprezzatura Group Web Site [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=26EF1799CABAA6F985256FE300058321|View this thread on the forum...]]