diff --git a/handler/src/main/java/io/netty/handler/ssl/JettyNpnSslSession.java b/handler/src/main/java/io/netty/handler/ssl/JettyNpnSslSession.java index b05866f174..f4da3da1d5 100644 --- a/handler/src/main/java/io/netty/handler/ssl/JettyNpnSslSession.java +++ b/handler/src/main/java/io/netty/handler/ssl/JettyNpnSslSession.java @@ -34,6 +34,9 @@ final class JettyNpnSslSession implements SSLSession { } void setApplicationProtocol(String applicationProtocol) { + if (applicationProtocol != null) { + applicationProtocol = applicationProtocol.replace(':', '_'); + } this.applicationProtocol = applicationProtocol; } diff --git a/handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java b/handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java index 8d27bfa042..677df6c9d2 100644 --- a/handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java +++ b/handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java @@ -808,7 +808,7 @@ public final class OpenSslEngine extends SSLEngine { if (applicationProtocol == null) { applicationProtocol = fallbackApplicationProtocol; } - this.applicationProtocol = applicationProtocol; + this.applicationProtocol = applicationProtocol.replace(':', '_'); return FINISHED; }