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 { ...@@ -418,10 +418,13 @@ public class DirectControlServlet extends HttpServlet {
418 Map<String, Object> result = dispatcher.runSync(serviceName, context); 418 Map<String, Object> result = dispatcher.runSync(serviceName, context);
419 419
420 result.remove("responseMessage"); 420 result.remove("responseMessage");
421 Integer httpStatusCode = (Integer) result.remove("httpStatusCode");
422 int statusCode = httpStatusCode == null ? 200 : httpStatusCode.intValue();
421 423
422 if (result.get("errorMessage") != null) { 424 if (result.get("errorMessage") != null) {
423 response.setStatus(400); 425 statusCode = 400;
424 } 426 }
427 response.setStatus(statusCode);
425 428
426 // Set to expire far in the past. 429 // Set to expire far in the past.
427 response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT"); 430 response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
......