Webrick and Cookies

Using a WEBrick::HTTPServer can some point me to an example
of using cookies with Webrick? Even better would an example of using sessions.

I am writing an application that, hopefully, will run on Apache and Webrick.

Thanks!

Look at webrick/cookie.rb. It think you can write:

cookie = Webrick::Cookie.new(name, value)
response.cookies += cookie

But be careful, it looks like Webrick does not take care of any special
characters in the cookie value.

···

<stedak@charter.net> wrote:

Using a WEBrick::HTTPServer can some point me to an example
of using cookies with Webrick?

I wonder if it could be possibile to unify Webrick::Cookie and
CGI::Cookie, and provide a WEBRick::Something to be used with
CGI::Session.
I believe that having a simple Session mechanism in webrick would be
really useful, or people is going to implement it by themself
continuosly (with resulting slow, buggy, unsecure implementations)

···

il 23 Jun 2004 06:32:26 GMT, Andreas Schwarz <usenet@andreas-s.net> ha scritto::