Escape a colon in protocol names

This commit is contained in:
Trustin Lee 2014-05-21 17:44:07 +09:00
parent ddb59fbc01
commit cf3e4e7043
2 changed files with 4 additions and 1 deletions

View File

@ -34,6 +34,9 @@ final class JettyNpnSslSession implements SSLSession {
}
void setApplicationProtocol(String applicationProtocol) {
if (applicationProtocol != null) {
applicationProtocol = applicationProtocol.replace(':', '_');
}
this.applicationProtocol = applicationProtocol;
}

View File

@ -808,7 +808,7 @@ public final class OpenSslEngine extends SSLEngine {
if (applicationProtocol == null) {
applicationProtocol = fallbackApplicationProtocol;
}
this.applicationProtocol = applicationProtocol;
this.applicationProtocol = applicationProtocol.replace(':', '_');
return FINISHED;
}