|
|
|
@ -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();
|
|
|
|
|