- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 31 Aug 2009 11:59:11 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv1324/src/org/w3c/unicorn/action
Modified Files:
IndexAction.java ObserveAction.java
Log Message:
Sends a 500 error code if unicorn is not initialized
Index: IndexAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/IndexAction.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- IndexAction.java 28 Aug 2009 16:11:41 -0000 1.3
+++ IndexAction.java 31 Aug 2009 11:59:09 -0000 1.4
@@ -26,6 +26,10 @@
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ if (!Framework.isUcnInitialized) {
+ resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
+ return;
+ }
resp.setContentType("text/html; charset=UTF-8");
Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ObserveAction.java 28 Aug 2009 12:40:08 -0000 1.2
+++ ObserveAction.java 31 Aug 2009 11:59:09 -0000 1.3
@@ -82,6 +82,12 @@
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
+
+ if (!Framework.isUcnInitialized) {
+ resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
+ return;
+ }
+
ObserveAction.logger.trace("doGet");
// Language negotiation
Received on Monday, 31 August 2009 11:59:21 UTC