Revision: 17163
http://sourceforge.net/p/gate/code/17163
Author: ian_roberts
Date: 2013-12-09 14:12:36 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
Send sensible 404s if you try and "manage" an index that does not exist.
Modified Paths:
--------------
mimir/trunk/mimir-web/grails-app/controllers/gate/mimir/web/IndexManagementController.groovy
Modified:
mimir/trunk/mimir-web/grails-app/controllers/gate/mimir/web/IndexManagementController.groovy
===================================================================
---
mimir/trunk/mimir-web/grails-app/controllers/gate/mimir/web/IndexManagementController.groovy
2013-12-06 19:18:33 UTC (rev 17162)
+++
mimir/trunk/mimir-web/grails-app/controllers/gate/mimir/web/IndexManagementController.groovy
2013-12-09 14:12:36 UTC (rev 17163)
@@ -42,6 +42,9 @@
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"Index with ID ${params.indexId} is in state ${theIndex.state}")
}
+ } else {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND,
+ "Index ID ${params.indexId} not known!")
}
}
@@ -55,6 +58,9 @@
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"Index with ID ${params.indexId} is in state ${theIndex.state}")
}
+ } else {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND,
+ "Index ID ${params.indexId} not known!")
}
}
@@ -66,6 +72,9 @@
new ObjectOutputStream (response.outputStream).withStream {stream ->
stream.writeDouble(value)
}
+ } else {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND,
+ "Index ID ${params.indexId} not known!")
}
} catch(Exception e){
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
@@ -89,6 +98,9 @@
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"Index with ID ${params.indexId} is in state ${theIndex.state}")
}
+ } else {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND,
+ "Index ID ${params.indexId} not known!")
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs