use of org.eclipse.jetty.server.HttpConfiguration.ConnectionFactory in project spring-boot by spring-projects.
the class JettyWebServerFactoryCustomizerTests method getRequestHeaderSizes.
private List<Integer> getRequestHeaderSizes(JettyWebServer server) {
List<Integer> requestHeaderSizes = new ArrayList<>();
// Start (and directly stop) server to have connectors available
server.start();
server.stop();
Connector[] connectors = server.getServer().getConnectors();
for (Connector connector : connectors) {
connector.getConnectionFactories().stream().filter((factory) -> factory instanceof ConnectionFactory).forEach((cf) -> {
ConnectionFactory factory = (ConnectionFactory) cf;
HttpConfiguration configuration = factory.getHttpConfiguration();
requestHeaderSizes.add(configuration.getRequestHeaderSize());
});
}
return requestHeaderSizes;
}
Aggregations