Forum: Ruby on Rails Problem with cookie-based sessions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
82e01981fb1270c0a54c544f9af342c5?d=identicon&s=25 John Devine (Guest)
on 2007-02-22 02:46
(Received via mailing list)
Having just switched to cookie-based sessions, I find that the
action_controller/session/cookie_store.rb methods are not marshalling/
unmarshalling my session data correctly.

Apparently the cookie has some escaped characters "%0A&" that cause a
line break.

When unmarshal is called on the cookie it only sees the part up until
those characters, when it is expecting to get the entire string which
includes the "--" placed there by the code in marshal, I guess because
of the "first" command in read cookie:

   # Read the session data cookie.
    def read_cookie

I've put up a pastie of the debug code and the cookies being set at

If anyone has any ideas or solutions, I'd be much obliged.

John Devine
82e01981fb1270c0a54c544f9af342c5?d=identicon&s=25 John Devine (Guest)
on 2007-02-22 03:26
(Received via mailing list)
Never mind -- I was too hasty in edge. This was fixed by changeset
6200. Thanks Bitsweat!
This topic is locked and can not be replied to.