Re: WOCookie & Safari
Re: WOCookie & Safari
- Subject: Re: WOCookie & Safari
- From: Ryan Klems <email@hidden>
- Date: Mon, 3 Mar 2008 17:08:02 -0700
I just tried this and also had the same problem under safari. It
would appear that safari is ignoring the max-age attribute, and
treating the cookie as a session cookie. I've filed a radar on the
safari team. Firefox does treat the cookie properly. *sigh*
5.4.2 is not a released product currently.
-Ryan
On Mar 3, 2008, at 4:06 PM, Michael Kondratov wrote:
Is 5.4.2 available? I only see 5.4.1.
I've tried to use timeout, but Safari still deletes my cookies on
exit.
Michael
On Mar 3, 2008, at 5:50 PM, Ryan Klems wrote:
This is a bug, fixed in 5.4.2. As a workaround, you could use the
timeout instead of the expiration date (max-age vs. expires
attribute). (I know this isn't great for existing code).
-Ryan
On Mar 3, 2008, at 11:54 AM, Chuck Hill wrote:
On Mar 3, 2008, at 10:50 AM, Michael Kondratov wrote:
Looks like Wo 5.4 or 5.4.1 (not sure)
[2008-3-3 18:24:21 EST] <main> WebObjects version = 5.4
Safari Version 3.0.4 (5523.15)
What's the current proper way of doing cookies in WO? :)
Use WO 5.3.3. :-)
Check the RFC: http://www.ietf.org/rfc/rfc2109.txt
If WO is not generating the correct format with 5.4, file a bug.
Chuck
On Mar 3, 2008, at 1:45 PM, Chuck Hill wrote:
Which version of WO? Have you updated recently? Have you
updated Safari recently? Have you checked the expires date
format in the Cookie RFC? Is WO generating the wrong format, or
is this a Safari bug?
Chuck
On Mar 3, 2008, at 10:39 AM, Michael Kondratov wrote:
For some unknown reason safari no longer properly parses my
cookie generated by WOCookie.
The cookies always expire when browser closes. When I look at
safari's properties, my cookies have no expiration dates.
My code:
String hostName = ".aspireauctions.com";
String path = "/";
NSTimestamp currentTime = new NSTimestamp();
NSTimestamp expiration =
currentTime.timestampByAddingGregorianUnits(1,0,0,0,0,0);
WOCookie bidderIdCookie = null;
try {
cookieValueBidderID =
URLEncoder.encode(bidderId.toString(),"UTF-8");
cookieValuePassword = URLEncoder.encode(password,"UTF-8");
}
catch(Exception e) {
System.out.println("Error encoding vookie");
System.out.println(e.toString());
}
// create cookie
try {
bidderIdCookie = new WOCookie("bidderid",cookieValueBidderID,
path, hostName, expiration, false);
//bidderIdCookie.setTimeOut(timeout);
bidderPasswordCookie = new WOCookie("bidderpassword",
cookieValuePassword, path, hostName, expiration, false);
//bidderPasswordCookie.setTimeOut(timeout);
}
catch(Exception e) {
System.out.println("Error creading bidder cookies");
System.out.println(e.toString());
}
if( (bidderIdCookie != null) && (bidderPasswordCookie !=
null) ) {
System.out.println(bidderIdCookie.headerString());
context().response().addCookie(bidderIdCookie);
context().response().addCookie(bidderPasswordCookie);
}
bidderid=111; version="1"; expires=Tue, 03-Mar-2009 06:25:04 GMT
+00:00; path=/
Michael
Aspire Auctions
216-231-5515
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden