94c3a2d7 by Adam Heath

Add feature to see the raw http status numerical code.

1 parent 95b259c8
......@@ -418,10 +418,13 @@ public class DirectControlServlet extends HttpServlet {
Map<String, Object> result = dispatcher.runSync(serviceName, context);
result.remove("responseMessage");
Integer httpStatusCode = (Integer) result.remove("httpStatusCode");
int statusCode = httpStatusCode == null ? 200 : httpStatusCode.intValue();
if (result.get("errorMessage") != null) {
response.setStatus(400);
statusCode = 400;
}
response.setStatus(statusCode);
// Set to expire far in the past.
response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
......