ruby-openid Server Example not working for me.
Arthur Pelicano
elpelicano at gmail.com
Sun Jun 10 05:03:37 PDT 2007
I've done a little further searching on my problem.
Recap :
When I launch the rails openid server example (in ruby-openid 1.1.4 after
@params, at sessions => params, session), there is a problem when the consumer
is trying to do the "associate" action.
Here is a little script to show the bug :
require 'uri'
require 'net/http'
url = "http://localhost:3000/server"
body = "
openid.dh_gen=Ag%3D%3D&openid.session_type=DH-SHA1&openid.mode=associate&openid.assoc_type=HMAC-SHA1&openid.dh_consumer_public=BQ4pHuPNQ70iVKivPQsMJJF3EzV88PRKW4OfgAzq4Gl%2B9E3w%2F1kxeRa%2BLlADLrJRosEKWq3Nk76m2Gr7usgQBd4s0x8m5%2B992BSpyF4D0E6O3V3O6JWXHXHrqgylwTr2PzJAJsp8NDYSSDEm6H25vIAR3lf3v9DkyvoPSovzC6g%3D&openid.dh_modulus=ANz5OguIOXLsDhmYmsWizjEOHTdxfo2Vcbt2I3MYZuYe91ouJ4mLBX%2BYkcLiemOcPym2CBRYHNOyyjmG0mg3BVd9RcLn5S3IHHoXGHblzqdLFEi%2F368Ygo79JRnxTkXjgmY0rxlJ5bU1zIKaSDuKdiI%2BXUkKJX8Fvf8W8vsixYOr
"
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
resp = http.post(uri.request_uri, body,
{"Content-type"=>"application/x-www-form-urlencoded"})
p resp.inspect
and if I launch the server with script/server :
=> Net::HTTPBadResponse: wrong status line: "HTTP/1.1 0 "
But if I launch the server with webrick (script/server webrick), everything
is fine :
=> "#<Net::HTTPOK 200 OK readbody=true>"
So my problem seems to be in fact with mongrel ! (I'm using mongrel (1.0.1)
on osx)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openidenabled.com/pipermail/dev/attachments/20070610/70b34b35/attachment.htm
More information about the Dev
mailing list