Re: [Solved] Odd cookie expiration behaviour (Safari related?)

2009-06-13 Thread Q


On 14/06/2009, at 8:16 AM, David Avendasora wrote:



On Jun 13, 2009, at 3:31 PM, Mike Schrag wrote:




The subtitle of this chart should be "please kill me".


Well last time I sent a clot, obviously that didn't work.


Obviously you should have sent cookies :)

--
Seeya...Q

Quinton Dolan - qdo...@gmail.com
Gold Coast, QLD, Australia (GMT+10)
Ph: +61 419 729 806



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: [Solved] Odd cookie expiration behaviour (Safari related?)

2009-06-13 Thread David Avendasora


On Jun 13, 2009, at 3:31 PM, Mike Schrag wrote:




The subtitle of this chart should be "please kill me".


Well last time I sent a clot, obviously that didn't work.

Almost, though. :-P

Dave
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: [Solved] Odd cookie expiration behaviour (Safari related?)

2009-06-13 Thread Mike Schrag



The subtitle of this chart should be "please kill me".

ms

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


[Solved] Odd cookie expiration behaviour (Safari related?)

2009-06-13 Thread Mark Gowdy

That did the trick, thanks:

NSTimestamp oneYear 	= new NSTimestamp 
().timestampByAddingGregorianUnits(1, 0, 0, 0, 0, 0);
NSTimestamp threeMonths = new NSTimestamp 
().timestampByAddingGregorianUnits(0, 3, 0, 0, 0, 0);
a_rsp.addCookie(new WOCookie("key_a_" + i, "v:" + i,   "/", null,  
oneYear, false));
a_rsp.addCookie(new WOCookie("key_b_" + i, "v:" + i++, "/", null,  
threeMonths, false));


I suspect my earlier issue is maybe a bug in how Safari handles the  
timeout duration value (possibly treating it as milliseconds rather  
than seconds)


Everyone beware!

Thanks,

Mark

On 12 Jun 2009, at 18:41, Mike Schrag wrote:


try using the NSTimestamp constructor and see if that works

On Jun 12, 2009, at 1:26 PM, Mark Gowdy wrote:


Hello,

We use cookies to do various tracking talks.
When we added a new cookie (with a shorter expiration time than we  
would normally use), we noticed something odd:


In Firefox, it was working as expected.
In Safari it was not appearing at all.

On closer inspection, we noticed that he cookie expiration time  
was odd.


This is some test code I am using (in Session's appendToResponse) is:

  private static int i = 0;
  
  a_rsp.addCookie(new WOCookie("key_a_" + i, "someValue" + i,
"/", null, 31104000, false)); // 31104000 seconds = ~12 months
  a_rsp.addCookie(new WOCookie("key_b_" + i, "someValue" + i++,  
"/", null,  7776000, false)); //  7776000 seconds =  ~3 months



In Firefox, these cookies appear as expected:
- Click 
key_a_0 = 0 (expires in 1 year)
key_b_0 = 0 (expires in 3 months)
- Click 
key_a_1 = 1 (expires in 1 year)
key_b_1 = 1 (expires in 3 months)


In Safari, it goes weird (to view these, go to Preferences -  
Security tab, and click 'show cookies' - it updates in real time)

- Click 
key_a_0 = 0 (expires in 12 days)
- Click 
key_a_1 = 1 (expires in 12 days)

(no sign of key_b_x)

This happens if you are using Direct Connect (when developing) and  
on a live server (with Apache, etc...)


Am I doing something wrong, or is Safari like some kinda crazy thing?

Mark

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag% 
40mdimension.com


This email sent to msch...@mdimension.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/gowdy%40mac.com

This email sent to go...@mac.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com