Skip to content

Commit

Permalink
Restore h2 support
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1770961 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Nov 23, 2016
1 parent a00aab4 commit 5619c16
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions java/org/apache/coyote/http11/AbstractHttp11Protocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public AbstractHttp11Protocol(AbstractEndpoint<S> endpoint) {

@Override
public void init() throws Exception {
super.init();

for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
configureUpgradeProtocol(upgradeProtocol);
}

super.init();
}


Expand Down
15 changes: 11 additions & 4 deletions java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,20 @@ private SSLHostConfigCertificate selectCertificate(

@Override
public boolean isAlpnSupported() {
// ALPN requires TLS so if there is no SSLImplementation, or if TLS is
// not enabled, ALPN cannot be supported
if (sslImplementation == null || !isSSLEnabled()) {
// ALPN requires TLS so if TLS is not enabled, ALPN cannot be supported
if (!isSSLEnabled()) {
return false;
}

// Depends on the SSLImplementation
// Depends on the SSLImplementation.
SSLImplementation sslImplementation;
try {
sslImplementation = SSLImplementation.getInstance(getSslImplementationName());
} catch (ClassNotFoundException e) {
// Ignore the exception. It will be logged when trying to start the
// end point.
return false;
}
return sslImplementation.isAlpnSupported();
}

Expand Down

0 comments on commit 5619c16

Please sign in to comment.