Need to maintiain session with requests from Flash movie

3 views
Skip to first unread message

David North

unread,
Mar 12, 2007, 7:54:08 AM3/12/07
to Ruby on Rails: Talk
My application has a flash element in it which makes a couple of
different requests which need to maintain the session. Since flash
movies don't seem to send the session cookie, I've had to pass in
Rails' session_id and append that to the querystring of the URLs Flash
requests.

Problem is that works for the first type of request which is a GET.
With the POST request (which uploads a file) Rails ignores the
session_id I supply and I get a new session_id.

I don't know if the session_id should be passed in as post data rather
than in the querystring for POST requests but due to a limitation in
how Flash does these uploads, the querystring is the only way I can do
it.

One solution would be to manually get Rails to use the right
session_id when it finds that parameter in the URL but I don't know if
that's possible.

Thanks

Peter De Berdt

unread,
Mar 12, 2007, 8:02:59 AM3/12/07
to rubyonra...@googlegroups.com
Use the hack described at:

Best regards


Peter De Berdt


David North

unread,
Mar 12, 2007, 9:59:53 AM3/12/07
to Ruby on Rails: Talk
Many thanks Peter, that was just what I was looking for.

David

Reply all
Reply to author
Forward
0 new messages