Forum: Mongrel Mongrel handler and root_handler

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
77dae8923911b83d3d4e1fbb22d95cd8?d=identicon&s=25 Emmanuel Pinault (Guest)
on 2008-05-31 01:40
(Received via mailing list)

I am writing my own handler and seeing some strance behavior. Best is
describing by the following code

say I create mongrel server (see at the end of the email) and have one
handler for the root (so shoudl handle all request..)
To my surprise the @a in the following code in the Handlder is not the
object I expect but a hash containing the name  {:a => <SomeObject
Instance> }

Looking right before the register is called, @a is correct... but
looking inside the handler... suddenly it is all different...... I
cannot find any doc or why in the code it is behaving that way,..
I am supposing this something due to how mongrel works but cannot
figure out why

any help would be appreciated



class MyServer
  def initialize( ip, port, log ,etc..)
    //saving all param in internal attributes

    @a =

  def start

    server ='localhost',  'port')

Following is the handler code

class Myhandler < Mongrel::HttpHandler
  def initialize(a, b, c)
    @a = a

  def process(request, response)
    // some code...

    @a = > this is a hash and not the real object passed originally
This topic is locked and can not be replied to.