Anyone ever use curl with user_engine before? Even though I say curl -u<user:pass> <address> it doesn''t seem to login. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Presumably curl will use HTTP Authentication, whereas the login engine doesn''t support this... On 10/13/06, Joe <jnkjok-QJzyweO1arydJdNcDFJN0w@public.gmane.org> wrote:> > Anyone ever use curl with user_engine before? Even though I say > > curl -u<user:pass> <address> > > it doesn''t seem to login. > > > > >-- * J * ~ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Oct 13, 2006, at 3:17 AM, James Adam wrote:> > Presumably curl will use HTTP Authentication, whereas the login engine > doesn''t support this... > > On 10/13/06, Joe <jnkjok-QJzyweO1arydJdNcDFJN0w@public.gmane.org> wrote: >> >> Anyone ever use curl with user_engine before? Even though I say >> >> curl -u<user:pass> <address> >> >> it doesn''t seem to login.If you browse to your site in a browser and log in, then inspect your cookie and copy the session id out of it you can use that in your curl command to get thru the auth. curl http://localhost:3000/foo/bar/12? session_id=dkjfh;dfh;ef;kladf;adj;fjadlk;fjad;fhadjkshfakdshf # or whatever it is. also I am not sure if its _sessionid or sessions_id. look at what the key is in the cookie and use that. -Ezra --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
That seemed to work for GET, but not for POST. I get a redirect from user_engine when using curl -i -X POST -d "<xml_data></xmldata>" http://<webpage>?_session_id=01234567890 If I use the command above without the post and the xml data, I get back the GET data I am expecting. If it was a routing issue, I would expect the GET not to work.I also removed the -i, but no difference. I''m using if request.post? --- end if request.get? --- end in the controller, request.get? works fine. In the development.log file, when I do the GET, the session id displayed is the same as the param value Session ID: ABC Parameters: {"_session_id"=>"ABC", "action"=>.. but in the POST I see they are different: Session ID: DEF Parameters: {"_session_id"=>"ABC", "action"=>... Where the session id DEF is different from the session that had worked previously. Why is user engine generating a new session for POST? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---