diff --git a/src/main/java/org/jboss/netty/handler/ssl/OpenSslEngine.java b/src/main/java/org/jboss/netty/handler/ssl/OpenSslEngine.java index 90e3f28acc..eb54d7f5fc 100644 --- a/src/main/java/org/jboss/netty/handler/ssl/OpenSslEngine.java +++ b/src/main/java/org/jboss/netty/handler/ssl/OpenSslEngine.java @@ -765,7 +765,11 @@ public final class OpenSslEngine extends SSLEngine { if (applicationProtocol == null) { applicationProtocol = fallbackApplicationProtocol; } - this.applicationProtocol = applicationProtocol.replace(':', '_'); + if (applicationProtocol != null) { + this.applicationProtocol = applicationProtocol.replace(':', '_'); + } else { + this.applicationProtocol = null; + } return FINISHED; }