We really need to get access to the HTTP server prior to entering its
listen/serve request loop, so we can customize and configure stuff
(e.g. socket timeout).  There are a few ways I've thought of that
would accomplish this end, but we'd like to submit the changes back to
web.py so I'd like your opinion on the best way to proceed.

The two most promising methods for influencing the HTTP server before
it starts running and serving requests:


1) Server init parameters passed as run() arguments:

        The web.application.run() definition could be changed to:

                def run(self, *middleware, **httpserverconfig)

        and the httpserverconfig dict would be passed down through:
                - wsgi.runwsgi() to
                -   wsgi.runfcgi() / wsgi.runscgi() / httpserver.runsimple()
                -   finally passed on to flups.WSGIServer/CherryPyWSGIServer
instance before going into run loop.



2) Add hooks to callbacks in web.wsgi, to expose the HTTP server to
arbitrary load/unload functions:

        web.wsgi would be modified to allow setting a callback:


                def myServerCallback(httpserver):
                        # do something with server
                        httpserver.timeout = 600
                        # ...

                web.wsgi.add_processor(loadhook(myServerCallback))

        and be edited to call the added loadhooks prior to server.start()/
server.run() as applicable.


Would either of these be cool or are there any suggestions for better
ways of accomplishing the same.

Thanks in advance,
Pat Deegan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to