Upgrade to Tomcat 9.0.31

Closes gh-20167
This commit is contained in:
Andy Wilkinson 2020-02-13 20:17:18 +00:00
parent db9f2734fe
commit 09fa8255cd
3 changed files with 7 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import org.apache.catalina.valves.AccessLogValve;
import org.apache.catalina.valves.ErrorReportValve;
import org.apache.catalina.valves.RemoteIpValve;
import org.apache.coyote.AbstractProtocol;
import org.apache.coyote.ajp.AbstractAjpProtocol;
import org.apache.coyote.http11.AbstractHttp11Protocol;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@ -490,6 +491,8 @@ class TomcatWebServerFactoryCustomizerTests {
void ajpConnectorCanBeCustomized() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(0);
factory.setProtocol("AJP/1.3");
factory.addConnectorCustomizers(
(connector) -> ((AbstractAjpProtocol<?>) connector.getProtocolHandler()).setSecretRequired(false));
this.customizer.customize(factory);
WebServer server = factory.getWebServer();
server.start();

View File

@ -1765,7 +1765,7 @@ bom {
]
}
}
library("Tomcat", "9.0.30") {
library("Tomcat", "9.0.31") {
group("org.apache.tomcat") {
modules = [
"tomcat-annotations-api",

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -152,7 +152,9 @@ class SslConnectorCustomizerTests {
customizer.customize(connector);
this.tomcat.start();
SSLHostConfig sslHostConfig = connector.getProtocolHandler().findSslHostConfigs()[0];
sslHostConfig.getCertificates(true);
SSLHostConfig sslHostConfigWithDefaults = new SSLHostConfig();
sslHostConfigWithDefaults.getCertificates(true);
assertThat(sslHostConfig.getTruststoreFile())
.isEqualTo(SslStoreProviderUrlStreamHandlerFactory.TRUST_STORE_URL);
assertThat(sslHostConfig.getCertificateKeystoreFile())