Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: multiplexer.fcgi

Issue 4826294168584192: Issue 2249 - Support UDP sockets in multiplexer.fcgi (Closed)
Patch Set: Issue 2249 - Support UDP sockets in multiplexer.fcgi Created April 1, 2015, 3:55 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: multiplexer.fcgi
diff --git a/multiplexer.fcgi b/multiplexer.fcgi
index d72b2c18a6d7e04b211354ec3a3e38895f74ed65..075367cc29697842ae92bbc82c4b96f2a36d9399 100755
--- a/multiplexer.fcgi
+++ b/multiplexer.fcgi
@@ -21,10 +21,12 @@ from flup.server.fcgi import WSGIServer
from sitescripts.web import multiplex
-bindAddress = None
-if 'FCGI_BIND_ADDRESS' in os.environ:
- match = re.match(r'^(.*?):(\d+)$', os.environ['FCGI_BIND_ADDRESS'])
- bindAddress = (match.group(1), int(match.group(2)))
+bindAddress = os.environ.get('FCGI_BIND_ADDRESS')
+if bindAddress:
+ match = re.search(r'^(.*?):(\d+)$', bindAddress)
+ if match:
+ bindAddress = (match.group(1), int(match.group(2)))
+
srv = WSGIServer(multiplex, debug=False, bindAddress=bindAddress)
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld