David North
2007-Mar-12 11:54 UTC
Need to maintiain session with requests from Flash movie
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Peter De Berdt
2007-Mar-12 12:02 UTC
Re: Need to maintiain session with requests from Flash movie
On 12 Mar 2007, at 12:54, David North wrote:> 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.Use the hack described at: http://blog.inquirylabs.com/2006/12/09/getting-the-_session_id-from- swfupload/ Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
David North
2007-Mar-12 13:59 UTC
Re: Need to maintiain session with requests from Flash movie
Many thanks Peter, that was just what I was looking for. David On Mar 12, 12:02 pm, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> On 12 Mar 2007, at 12:54, David North wrote: > > > > > 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. > > Use the hack described at:http://blog.inquirylabs.com/2006/12/09/getting-the-_session_id-from- > swfupload/ > > Best regards > > Peter De Berdt--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---