Sessions and GET (CGI.rb)

R

Robert

Hi!

I'm close to the deadline for a (rails) project that must support
users without cookies. Unfortunately, there's a bug in Rails/CGI.rb,
that prevents a session from propagating if:
a) the session id is in the GET request
b) a form has been POSTed

http://dev.rubyonrails.com/ticket/210

Now, what I'm looking for is a quick hack, that allows me to manually
set the session id.

I tried something overwriting the session object using this:

session = CGI::Session.new(CGI.new, :session_id => params
[:_session_id]) if(params[:_session_id])

Unfortunately that doesn't work. A new session is created, and the
session.session_id differs from params[:_session_id].

What am I doing wrong? How can I recreate a session object if I know
the sessions' ID?



Thanks a bunch,
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top