Add feature to see the raw http status numerical code.
Showing
1 changed file
with
4 additions
and
1 deletions
... | @@ -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"); | ... | ... |
-
Please register or sign in to post a comment