commit 9094ffce04586a13cef8fdafe7f4005b17285160 Author: David Fifield david@bamsoftware.com Date: Wed Mar 6 21:42:09 2013 -0800
Catch errors in url_reg.
Like if facilitator-reg-url is not running. --- facilitator/facilitator.cgi | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/facilitator/facilitator.cgi b/facilitator/facilitator.cgi index 003cf86..0324fe5 100755 --- a/facilitator/facilitator.cgi +++ b/facilitator/facilitator.cgi @@ -47,9 +47,13 @@ def do_get(): path_parts = [x for x in path_info.split("/") if x] if len(path_parts) == 2 and path_parts[0] == "reg": # This is a URL-based registration. - if not url_reg(path_parts[1]): + try: + if url_reg(path_parts[1]): + output_status(204) + else: + exit_error(400) + except: exit_error(500) - output_status(204) elif len(path_parts) == 0: try: reg = fac.get_reg(FACILITATOR_ADDR, remote_addr) or ""
tor-commits@lists.torproject.org