[Dancer-users] Cookie handling

Deepak Gulati deepak.gulati at gmail.com
Wed Jan 5 16:40:14 CET 2011


Hi Folks,

At the moment, if my cookie value contains = or ; I have take care to
escape them myself - e.g.

set_cookie 'msg' => 'Hello;World'

just emits

Set-Cookie: msg=Hello;World; path=/; HttpOnly

The browser of course ignores World and I get just msg=Hello as the cookie.

1. Shouldn't set_cookie be URI encoding the value automatically?

2. It'll also be nice if the value of the cookie could be a hash
reference which I could serialize/deserialize from the cookie - or do
you think this really belongs to Dancer::Session::Cookie?

Thanks,
Deepak


More information about the Dancer-users mailing list