Hi,
thanks for your reply.
I just wanted to point out how I fixed it, in case it helps someone
else:
in the cookie_store, I only have access to the @session object, so to
keep the hack confined there, I had to use the query string instead,
like so:
cookie_name = @cookie_options["name"]
reg = %r{#{cookie_name}=(.+)}
md = reg.match @session.cgi.env_table["QUERY_STRING"]
if md
cookie = md[1]
else
reg = %r{#{cookie_name}=(.+)&}
md = reg.match @session.cgi.env_table["QUERY_STRING"]
if md
cookie = md[1]
end
end
Ugly, but it works.
Cheers
Cyrille
On Sep 17, 10:21 pm, Hongli Lai <
hon...@phusion.nl> wrote:
> On Thu, Sep 17, 2009 at 11:14 AM, Cyrille <
cbonne...@gmail.com> wrote:
>
> > Hi there,
>
> > Yes it is. And @session.cgi.stdinput is of class UNIXSocket.
>
> > If I check @session.cgi.stdinput.eof? it says true.
>
> > So apparently the socket is closed... Is that expected?
> > Is it possible that the socket content has already been read? If so,
> > is there a way I can access the request body?
>
> Yes, the socket is closed and its contents has probably already been
> read by Rails. If you can access the Rails request object you can
> extract the parameters from there.
>
> --
> Phusion | The Computer Science Company
>
> Web:
http://www.phusion.nl/
> E-mail:
i...@phusion.nl