From: Eric Hodel Date: 2004-05-05T18:45:19-07:00 Subject: Re: session management with webrick --gWRamliw218YCZO9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Eric Hodel (drbrain@segment7.net) wrote: > gabriele renzi (surrender_it@rc1.vip.ukl.yahoo.com) wrote: >=20 > > Hi gurus and nubys, > >=20 > > I'm playing a little with webrick, and I'm having great fun with it. > > I'm writing a little app using some ERB pages and Madeleine as the > > data store, but I'm now wondering how to handle user sessions > > (basically I just need to pass a pair of vars from page to page).=20 > >=20 > > The only thing I can think of is to use CGI/session and a MemoryStore, > > but I wonder if there is some better method built in webrick. > >=20 > > Any hint ? >=20 > Seriously, you could send back a cookie or hidden form field, and make > an association in your data store between the cookie value and the > session, just like CGI/Session does. You may also want to look at webrick/cookie.rb. --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --gWRamliw218YCZO9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQFAmZivMypVHHlsnwQRAraeAKCcrmgxERcFDbOGncVqnc08zv4u/ACfSS3I EL/zoHJTtvW79ZREofSrTWw= =Hb3S -----END PGP SIGNATURE----- --gWRamliw218YCZO9--