[tor-commits] [flashproxy/master] Don't catch SystemExit in catch-all exceptions.
dcf at torproject.org
dcf at torproject.org
Mon May 20 19:22:28 UTC 2013
commit fb511b3850dcbdd823a5caed0544064d91f853b6
Author: David Fifield <david at bamsoftware.com>
Date: Mon May 20 12:21:38 2013 -0700
Don't catch SystemExit in catch-all exceptions.
exit_error raises SystemExit. This was causing the exception handler for
exit_error(400) to print another "Status: 500" in the response body.
---
facilitator/facilitator.cgi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/facilitator/facilitator.cgi b/facilitator/facilitator.cgi
index 4885ead..266905d 100755
--- a/facilitator/facilitator.cgi
+++ b/facilitator/facilitator.cgi
@@ -43,7 +43,7 @@ def url_reg(reg):
output_status(204)
else:
exit_error(400)
- except:
+ except Exception:
exit_error(500)
def do_head():
@@ -60,7 +60,7 @@ def do_get():
elif len(path_parts) == 0:
try:
reg = fac.get_reg(FACILITATOR_ADDR, remote_addr) or ""
- except:
+ except Exception:
exit_error(500)
# Allow XMLHttpRequest from any domain. http://www.w3.org/TR/cors/.
print """\
More information about the tor-commits
mailing list