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

Delta Between Two Patch Sets: multiplexer.fcgi

Issue 4826294168584192: Issue 2249 - Support UDP sockets in multiplexer.fcgi (Closed)
Left Patch Set: Issue 2249 - Support UDP sockets in multiplexer.fcgi Created April 1, 2015, 8 a.m.
Right Patch Set: Issue 2249 - Support UDP sockets in multiplexer.fcgi Created April 1, 2015, 3:55 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # coding: utf-8 2 # coding: utf-8
3 3
4 # This file is part of the Adblock Plus web scripts, 4 # This file is part of the Adblock Plus web scripts,
5 # Copyright (C) 2006-2015 Eyeo GmbH 5 # Copyright (C) 2006-2015 Eyeo GmbH
6 # 6 #
7 # Adblock Plus is free software: you can redistribute it and/or modify 7 # Adblock Plus is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License version 3 as 8 # it under the terms of the GNU General Public License version 3 as
9 # published by the Free Software Foundation. 9 # published by the Free Software Foundation.
10 # 10 #
11 # Adblock Plus is distributed in the hope that it will be useful, 11 # Adblock Plus is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details. 14 # GNU General Public License for more details.
15 # 15 #
16 # You should have received a copy of the GNU General Public License 16 # You should have received a copy of the GNU General Public License
17 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 17 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
18 18
19 import os, re 19 import os, re
20 from flup.server.fcgi import WSGIServer 20 from flup.server.fcgi import WSGIServer
21 21
22 from sitescripts.web import multiplex 22 from sitescripts.web import multiplex
23 23
24 bindAddress = os.environ.get('FCGI_BIND_ADDRESS') 24 bindAddress = os.environ.get('FCGI_BIND_ADDRESS')
25 if bindAddress: 25 if bindAddress:
26 match = re.match(r'^(.*?):(\d+)$', bindAddress) 26 match = re.search(r'^(.*?):(\d+)$', bindAddress)
27 if match: 27 if match:
28 bindAddress = (match.group(1), int(match.group(2))) 28 bindAddress = (match.group(1), int(match.group(2)))
29 29
30 srv = WSGIServer(multiplex, debug=False, bindAddress=bindAddress) 30 srv = WSGIServer(multiplex, debug=False, bindAddress=bindAddress)
31 31
32 if __name__ == '__main__': 32 if __name__ == '__main__':
33 srv.run() 33 srv.run()
34 34
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld