Skip to content

Commit

Permalink
APPNG-2485
Browse files Browse the repository at this point in the history
  • Loading branch information
madness-inc committed Aug 23, 2023
1 parent 31788d7 commit 5215a68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public void handle(HttpServletRequest servletRequest, HttpServletResponse servle
servletRequest.setAttribute(MetricsFilter.SERVICE_NAME, serviceName);
handleSoap(siteToUse, application, environment, servletRequest, servletResponse);
} else if (SERVICE_TYPE_REST.equals(serviceType)) {
path.checkPathLength(6);
path.checkPathLength(5);
handleRest(application, servletRequest, servletResponse);
} else {
LOGGER.warn("unknown service type: {}", serviceType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ public void testRestWrongURL() throws Exception {
handleRestCall("", null, HttpStatus.NOT_FOUND, "/services/site1/appng-demoapplication/rest/notfound");
}

@Test
public void testRootPath() throws Exception {
handleRestCall("", null, HttpStatus.NOT_FOUND, "/services/site1/appng-demoapplication/rest/");
}

@Test
public void testRestHandleBusinessException() throws Exception {
handleRestCall(11, 47, "{\"message\":\"BOOOM!\"}", MediaType.APPLICATION_JSON_UTF8_VALUE,
Expand Down

0 comments on commit 5215a68

Please sign in to comment.