fix(gateway): Append trailing slash when path is empty
@@ -43,7 +43,7 @@ public class ContextualizedHttpServerRequest implements Request {
StringBuilder sb = new StringBuilder(request.path())
.delete(0, contextPath.length());
- if (sb.charAt(sb.length()-1) != '/') {
+ if (sb.length() == 0 || sb.charAt(sb.length()-1) != '/') {
sb.append('/');
}
