[Lift] Re: Debug cookies

2009-10-13 Thread Timothy Perrett
+1 This is very sound advice. Cheers, Tim On 12 Oct 2009, at 21:35, Ross Mellgren wrote: I don't know if it increases compile time but I avoid wildcard imports like the plague because I think they're perhaps the most confusing thing reading scala code. Thinking to yourself that two types

[Lift] Re: Debug cookies

2009-10-12 Thread Ross Mellgren
I usually use FireBug or Safari Web Inspector to look at the Set- Cookie / Cookie headers going back and forth, or use the browser's built in cookie index (usually buried in preferences). You could also use something like Wireshark or tcpdump to watch the headers go by if you're using a

[Lift] Re: Debug cookies

2009-10-12 Thread Naftoli Gugenheim
Firecookie (a Firebug extension) says the cookie's Expires is Session. When I log in Firebug's Net panel shows the following response header (I changed the cookie name): Set-Cookie mycookiename=Z0GZIXFRBQMVTOITYSICI1XZN23ROYLN My code in Boot looks like this:     User.autologinFunc = Full(()={   

[Lift] Re: Debug cookies

2009-10-12 Thread Ross Mellgren
setMaxAge is unfortunately named -- looking at the code it appears that HTTPCookies are actually immutable, and what setMaxAge does is returns you a new cookie with the new settings. Try: val cookie = net.liftweb.http.provider.HTTPCookie(cookieName, user.uniqueId.is ).setMaxAge(2 weeks)

[Lift] Re: Debug cookies

2009-10-12 Thread Naftoli Gugenheim
Thanks. I actually looked at the source code of HTTPCookie but I didn't put two and two together reading my code in Boot. I think the reason I did the math manually is because I was trying to minimize the number of imports. Do you think a lot of wildcard imports increase compile time, or not

[Lift] Re: Debug cookies

2009-10-12 Thread Ross Mellgren
I don't know if it increases compile time but I avoid wildcard imports like the plague because I think they're perhaps the most confusing thing reading scala code. Thinking to yourself that two types don't match, but you can't be sure if you're reading it wrong or if there's an implicit