Edgewall Software

Ticket #6224: standalone_fcgi.diff

File standalone_fcgi.diff, 1.4 KB (added by josh@…, 4 years ago)

Diff to add FCGI server capability to tracd.

Line 
1--- web/standalone_old.py       2007-04-03 01:29:43.000000000 -0700
2+++ web/standalone.py   2007-10-20 20:35:23.000000000 -0700
3@ -145,8 +144,8 @@
4                       help='the host name or IP address to bind to')
5     parser.add_option('--protocol', action='callback', type="string",
6                       dest='protocol', callback=_validate_callback,
7-                      callback_args=(('http', 'scgi', 'ajp'),),
8-                      help='http|scgi|ajp')
9+                      callback_args=(('http', 'scgi', 'ajp', 'fcgi'),),
10+                      help='http|scgi|ajp|fcgi')
11     parser.add_option('-e', '--env-parent-dir', action='store',
12                       dest='env_parent_dir', metavar='PARENTDIR',
13                       help='parent directory of the project environments')
14@@ -190,6 +189,7 @@
15             'http': 80,
16             'scgi': 4000,
17             'ajp': 8009,
18+            'fcgi': 8000,
19         }[options.protocol]
20     server_address = (options.hostname, options.port)
21 
22@@ -226,15 +226,8 @@
23         def serve():
24             httpd = TracHTTPServer(server_address, wsgi_app,
25                                    options.env_parent_dir, args)
26             httpd.serve_forever()
27-    elif options.protocol in ('scgi', 'ajp'):
28+    elif options.protocol in ('scgi', 'ajp', 'fcgi'):
29         def serve():
30             server_cls = __import__('flup.server.%s' % options.protocol,
31                                     None, None, ['']).WSGIServer