[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Fix an IllegalStateException.
commit dac09a8ccc2a6a4166c40ccfff89751afc0e7585
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Tue Sep 13 16:36:08 2011 +0200
Fix an IllegalStateException.
We're not allowed to forward a request after we started responding to it,
here by sending an error code.
---
.../torproject/ernie/web/RouterDetailServlet.java | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/org/torproject/ernie/web/RouterDetailServlet.java b/src/org/torproject/ernie/web/RouterDetailServlet.java
index 4a25352..c8c4648 100644
--- a/src/org/torproject/ernie/web/RouterDetailServlet.java
+++ b/src/org/torproject/ernie/web/RouterDetailServlet.java
@@ -112,6 +112,10 @@ public class RouterDetailServlet extends HttpServlet {
/* There were zero results in the set */
/* TODO Handle this case in a more user-friendly way. */
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
+ this.logger.log(Level.WARNING, "Query with fingerprint = '"
+ + fingerprintParameter + "' returned zero results. "
+ + "Returned BAD_REQUEST.");
+ return;
}
conn.close();
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits