Anyone ever use curl with user_engine before? Even though I say
curl -uuser:pass
it doesn’t seem to login.
Anyone ever use curl with user_engine before? Even though I say
curl -uuser:pass
it doesn’t seem to login.
Presumably curl will use HTTP Authentication, whereas the login engine
doesn’t support this…
On 10/13/06, Joe [email protected] wrote:
Anyone ever use curl with user_engine before? Even though I say
curl -uuser:pass
it doesn’t seem to login.
–
On Oct 13, 2006, at 3:17 AM, James A. wrote:
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
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>”
http://?_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
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?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs