diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index 54626cfe045..6d9edb0d36c 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -622,7 +622,7 @@ public class Request implements HttpServletRequest return _endp.getLocalHost(); String local = _endp.getLocalAddr(); - if (local.indexOf(':')>=0) + if (local!=null && local.indexOf(':')>=0) local="["+local+"]"; return local; }