Changeset 517
- Timestamp:
- 12/12/06 10:44:58 (2 years ago)
- Files:
-
- cherokee-pyscgi/ChangeLog (modified) (1 diff)
- cherokee-pyscgi/pyscgi/pyscgi.py (modified) (1 diff)
- cherokee-pyscgi/tests/test1_env.py (modified) (2 diffs)
- cherokee-pyscgi/tests/test2_post.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee-pyscgi/ChangeLog
r504 r517 1 2006-12-12 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * tests/test1_env.py, tests/test2_post.py: Updated for using 4 ServerFactory. 5 6 * pyscgi/pyscgi.py: Added new SCGIServerFork class implementing a 7 forking server. So far I had only a Thread based one. 8 9 * pyscgi/pyscgi.py (ServerFactory): Added a new factory function 10 to instance servers. 11 1 12 2006-12-10 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 13 cherokee-pyscgi/pyscgi/pyscgi.py
r504 r517 104 104 def __init__(self, handler_class=SCGIHandler, host="", port=4000): 105 105 self.allow_reuse_address = True 106 SocketServer.TCPServer.__init__ (self, (host, port), handler_class) 106 SocketServer.ThreadingTCPServer.__init__ (self, (host, port), handler_class) 107 108 class SCGIServerFork (SocketServer.ForkingTCPServer): 109 def __init__(self, handler_class=SCGIHandler, host="", port=4000): 110 self.allow_reuse_address = True 111 SocketServer.ForkingTCPServer.__init__ (self, (host, port), handler_class) 112 113 114 def ServerFactory (threading=False, *args, **kargs): 115 if threading: 116 return SCGIServer(*args, **kargs) 117 else: 118 return SCGIServerFork(*args, **kargs) cherokee-pyscgi/tests/test1_env.py
r504 r517 1 1 #!/usr/bin/env python 2 2 3 from pyscgi import S CGIHandler, SCGIServer3 from pyscgi import ServerFactory, SCGIHandler 4 4 5 5 DEFAULT_PORT = 4000 … … 21 21 22 22 def main(): 23 srv = S CGIServer(handler_class=MyHandler, port=DEFAULT_PORT)23 srv = ServerFactory(handler_class=MyHandler, port=DEFAULT_PORT) 24 24 srv.serve_forever() 25 25 cherokee-pyscgi/tests/test2_post.py
r504 r517 1 1 #!/usr/bin/env python 2 2 3 from pyscgi import SCGIHandler, S CGIServer3 from pyscgi import SCGIHandler, ServerFactory 4 4 5 5 DEFAULT_PORT = 4000 … … 37 37 38 38 def main(): 39 srv = S CGIServer(handler_class=MyHandler, port=DEFAULT_PORT)39 srv = ServerFactory(handler_class=MyHandler, port=DEFAULT_PORT) 40 40 srv.serve_forever() 41 41