RTC Forums
April 25, 2024, 04:33:40 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Expire date for cookies don't work  (Read 6431 times)
milvards
Guest
« on: February 01, 2010, 12:58:53 PM »

Hi.

I'm trying to set a cookie like this:

AResponseInfo.Cookie['cookiename'] := 'something; expires=31-Jan-2011 00:00:00 GMT;';

I've tried different date formats, but no matter what I do they get expiration date: At end of session.

This happens in different browsers.

Can anyone tell me what I'm doing wrong. I'm using SDK 3.47.

Regards,
Roy M. Milvardsen

PS! By the way, why can't I make a new topic in PRO Support?
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: February 01, 2010, 01:14:57 PM »

Where did "AResponseInfo" come from? IOW, how was it initialized or where was it acquired?

PS. You can not post in the PRO Support section because you have the Basic subscription, but PRO Support is available only in Bronze, Silver and Gold subscriptions. For more information on what you get with each subscription, please visit the RTC SDK Price and Order page:
http://www.realthinclient.com/order.htm

Best Regards,
Danijel Tkalcec
Logged
milvards
Guest
« Reply #2 on: February 01, 2010, 02:20:21 PM »

Thanks for your prompt answer.

AResponseInfo is of type TRtcResponse and is used like this:

procedure TServerDataModule.RtcDataProvider1DataReceived(Sender: TRtcConnection) //Event

TRtcDataServer(Sender).Response.Cookie['cookiename'] := 'something; expires=31-Jan-2011 00:00:00 GMT;';

I discovered that if I changed this to:

TRtcDataServer(Sender).Response.Cookie['cookiename'] := 'something; expires=Mon, 31-Jan-2011 00:00:00 GMT;';

it worked. Seems like I had to include short day name to make it work. But as I am in Norway the default here would have been in Norwegian. I.E.:

TRtcDataServer(Sender).Response.Cookie['cookiename'] := 'something; expires=, 30-mai-2010 00:00:00 GMT;';

This fails. Do you know if I have to use English day and month names here?

Thanks,
Roy M.

Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: February 01, 2010, 02:27:20 PM »

http://en.wikipedia.org/wiki/HTTP_cookie
Logged
milvards
Guest
« Reply #4 on: February 01, 2010, 03:20:20 PM »

Thanks for your help, Danijel.

After using English for months and weekdays all went like a dream. Odd since Windows and IE8 is with Norwegian settings.

Best regards,
Roy m.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #5 on: February 01, 2010, 06:10:58 PM »

Browser settings have very little to do with the HTTP standard. What you set up in your browser is the graphical user interface language (menus,dialogs, etc), which has no impact on the underlying protocol.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 16 queries.